Files
oxc-project__oxc/crates/oxc_allocator/tests/arena/main.rs
Boshen 2cde1f6671 fix(rust): address nightly deprecations (#25998)
Addresses deprecations reported by the latest Rust nightly while preserving Rust 1.98 compatibility.

- Rename `unit-bindings` to `unit_bindings`: hyphenated lint names are deprecated in favor of their canonical underscore spelling.
- Replace `isize::max_value()` and `usize::max_value()` with `isize::MAX` and `usize::MAX`: the legacy numeric methods are deprecated in favor of associated constants.
- Set explicit `MAX_INDEX` values on `define_index_type!`: `oxc_index` otherwise generates `<raw>::max_value() as usize`; the explicit modern constants avoid that deprecated expansion without changing the index limits.
- Remove obsolete `clippy::legacy_numeric_constants` expectations: the corrected code no longer triggers that lint, so the expectations would be unfulfilled.
- Allow the AST scanner to consume optional `define_index_type!` configuration: it previously parsed only the struct declaration and rejected the added `MAX_INDEX` option.

AI-assisted.
2026-08-22 11:34:02 +00:00

32 lines
824 B
Rust

#![expect(
clippy::allow_attributes,
clippy::cast_possible_truncation,
clippy::dbg_macro,
clippy::explicit_into_iter_loop,
clippy::items_after_statements,
clippy::large_enum_variant,
clippy::large_stack_arrays,
clippy::match_like_matches_macro,
clippy::match_same_arms,
clippy::needless_pass_by_value,
clippy::print_stderr,
clippy::print_stdout,
clippy::ptr_cast_constness,
clippy::ptr_offset_by_literal,
clippy::ref_as_ptr,
clippy::undocumented_unsafe_blocks,
clippy::uninlined_format_args
)]
// `#[ignore]` attrs only exist when `debug_assertions` is enabled
#![cfg_attr(debug_assertions, expect(clippy::ignore_without_reason))]
mod alloc_fill;
mod alloc_with;
mod capacity;
mod quickcheck;
mod quickchecks;
mod tests;
mod try_alloc_with;
fn main() {}