Skip to content

Commit 5c5e010

Browse files
committed
refactor(allocator/vec): disable lint warnings in vec2 files (#9730)
Disable lint warnings for `vec2::Vec` (the implementation copied from `bumpalo` in #9646).
1 parent daf7a1e commit 5c5e010

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

crates/oxc_allocator/src/vec2/mod.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,24 @@
9090
//! [`IndexMut`]: https://doc.rust-lang.org/std/ops/trait.IndexMut.html
9191
//! [`vec!`]: ../../macro.vec.html
9292
93+
#![expect(
94+
clippy::semicolon_if_nothing_returned,
95+
clippy::needless_pass_by_ref_mut,
96+
clippy::needless_for_each,
97+
clippy::needless_lifetimes,
98+
clippy::cloned_instead_of_copied,
99+
clippy::checked_conversions,
100+
clippy::legacy_numeric_constants,
101+
clippy::cast_sign_loss,
102+
clippy::cast_possible_wrap,
103+
clippy::swap_ptr_to_ref,
104+
clippy::ref_as_ptr,
105+
clippy::ptr_as_ptr,
106+
clippy::ptr_cast_constness,
107+
unsafe_op_in_unsafe_fn,
108+
clippy::undocumented_unsafe_blocks
109+
)]
110+
93111
use super::raw_vec::RawVec;
94112
use crate::Bump;
95113
use crate::collections::CollectionAllocErr;

crates/oxc_allocator/src/vec2/raw_vec.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@
1010
// option. This file may not be copied, modified, or distributed
1111
// except according to those terms.
1212

13+
#![allow(
14+
unused_mut,
15+
unused_unsafe,
16+
clippy::allow_attributes,
17+
clippy::uninlined_format_args,
18+
clippy::enum_glob_use,
19+
clippy::equatable_if_let,
20+
clippy::needless_pass_by_value,
21+
clippy::inline_always
22+
)]
1323
#![allow(unstable_name_collisions)]
1424
#![allow(dead_code)]
1525

0 commit comments

Comments
 (0)