Skip to content

Commit b34520c

Browse files
FIXUP: ugh yet more lint expectations
1 parent 1cfa660 commit b34520c

50 files changed

Lines changed: 98 additions & 92 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

naga/src/arena/handlevec.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ impl<T, U> Default for HandleVec<T, U> {
3434
}
3535
}
3636

37-
#[allow(dead_code)]
3837
impl<T, U> HandleVec<T, U> {
3938
pub(crate) const fn new() -> Self {
4039
Self {
@@ -66,7 +65,10 @@ impl<T, U> HandleVec<T, U> {
6665
assert_eq!(handle.index(), self.inner.len());
6766
self.inner.push(value);
6867
}
68+
}
6969

70+
#[cfg_attr(not(any(glsl_out, spv_out, msl_out)), expect(dead_code))]
71+
impl<T, U> HandleVec<T, U> {
7072
pub(crate) fn get(&self, handle: Handle<T>) -> Option<&U> {
7173
self.inner.get(handle.index())
7274
}

naga/src/back/msl/writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ impl<W: Write> Writer<W> {
17771777
Ok(())
17781778
}
17791779

1780-
#[allow(clippy::too_many_arguments)]
1780+
#[expect(clippy::too_many_arguments)]
17811781
fn put_possibly_const_expression<C, I, E>(
17821782
&mut self,
17831783
expr_handle: Handle<crate::Expression>,

naga/src/back/spv/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2987,7 +2987,7 @@ impl BlockContext<'_> {
29872987
}
29882988

29892989
/// Build the instructions for matrix - matrix column operations
2990-
#[allow(clippy::too_many_arguments)]
2990+
#[expect(clippy::too_many_arguments)]
29912991
fn write_matrix_matrix_column_op(
29922992
&mut self,
29932993
block: &mut Block,

naga/src/back/spv/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub(super) fn str_bytes_to_words(bytes: &[u8]) -> Vec<Word> {
2929
}
3030

3131
/// split a string into chunks and keep utf8 valid
32-
#[allow(unstable_name_collisions)]
32+
#[expect(unstable_name_collisions)]
3333
pub(super) fn string_to_byte_chunks(input: &str, limit: usize) -> Vec<&[u8]> {
3434
let mut offset: usize = 0;
3535
let mut start: usize = 0;

naga/src/back/spv/image.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ impl BlockContext<'_> {
719719
/// Generate code for an `ImageLoad` expression.
720720
///
721721
/// The arguments are the components of an `Expression::ImageLoad` variant.
722-
#[allow(clippy::too_many_arguments)]
722+
#[expect(clippy::too_many_arguments)]
723723
pub(super) fn write_image_load(
724724
&mut self,
725725
result_type_id: Word,
@@ -799,7 +799,7 @@ impl BlockContext<'_> {
799799
/// Generate code for an `ImageSample` expression.
800800
///
801801
/// The arguments are the components of an `Expression::ImageSample` variant.
802-
#[allow(clippy::too_many_arguments)]
802+
#[expect(clippy::too_many_arguments)]
803803
pub(super) fn write_image_sample(
804804
&mut self,
805805
result_type_id: Word,

naga/src/back/spv/instructions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ impl super::Instruction {
778778
//
779779
// Ray Query Instructions
780780
//
781-
#[allow(clippy::too_many_arguments)]
781+
#[expect(clippy::too_many_arguments)]
782782
pub(super) fn ray_query_initialize(
783783
query: Word,
784784
acceleration_structure: Word,

naga/src/front/glsl/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ impl<'a> Context<'a> {
503503
vector = pointer;
504504
}
505505

506-
#[allow(clippy::needless_range_loop)]
506+
#[expect(clippy::needless_range_loop)]
507507
for index in 0..size {
508508
let dst = self.add_expression(
509509
Expression::AccessIndex {

naga/src/front/glsl/functions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl Frontend {
207207
})
208208
}
209209

210-
#[allow(clippy::too_many_arguments)]
210+
#[expect(clippy::too_many_arguments)]
211211
fn matrix_one_arg(
212212
&mut self,
213213
ctx: &mut Context,
@@ -869,7 +869,7 @@ impl Frontend {
869869

870870
/// Processes a function call argument that appears in place of an output
871871
/// parameter.
872-
#[allow(clippy::too_many_arguments)]
872+
#[expect(clippy::too_many_arguments)]
873873
fn process_lhs_argument(
874874
&mut self,
875875
ctx: &mut Context,

naga/src/front/spv/image.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ impl<I: Iterator<Item = u32>> super::Frontend<I> {
486486
Ok(())
487487
}
488488

489-
#[allow(clippy::too_many_arguments)]
489+
#[expect(clippy::too_many_arguments)]
490490
pub(super) fn parse_image_sample(
491491
&mut self,
492492
mut words_left: u16,

naga/src/front/spv/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
10741074
/// A more complicated version of the binary op,
10751075
/// where we force the operand to have the same type as the result.
10761076
/// This is mostly needed for "i++" and "i--" coming from GLSL.
1077-
#[allow(clippy::too_many_arguments)]
1077+
#[expect(clippy::too_many_arguments)]
10781078
fn parse_expr_binary_op_sign_adjusted(
10791079
&mut self,
10801080
ctx: &mut BlockContext,
@@ -1152,7 +1152,7 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
11521152
/// A version of the binary op where one or both of the arguments might need to be casted to a
11531153
/// specific integer kind (unsigned or signed), used for operations like OpINotEqual or
11541154
/// OpUGreaterThan.
1155-
#[allow(clippy::too_many_arguments)]
1155+
#[expect(clippy::too_many_arguments)]
11561156
fn parse_expr_int_comparison(
11571157
&mut self,
11581158
ctx: &mut BlockContext,
@@ -1300,7 +1300,7 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
13001300
Ok(())
13011301
}
13021302

1303-
#[allow(clippy::too_many_arguments)]
1303+
#[expect(clippy::too_many_arguments)]
13041304
fn insert_composite(
13051305
&self,
13061306
root_expr: Handle<crate::Expression>,
@@ -1424,7 +1424,7 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
14241424
Ok((p_lexp_handle, p_base_ty.handle))
14251425
}
14261426

1427-
#[allow(clippy::too_many_arguments)]
1427+
#[expect(clippy::too_many_arguments)]
14281428
fn parse_atomic_expr_with_value(
14291429
&mut self,
14301430
inst: Instruction,

0 commit comments

Comments
 (0)