diff --git a/vello/src/lib.rs b/vello/src/lib.rs index 480f99122..7a0d04dc5 100644 --- a/vello/src/lib.rs +++ b/vello/src/lib.rs @@ -105,15 +105,32 @@ clippy::missing_assert_message, clippy::shadow_unrelated, clippy::missing_panics_doc, - clippy::missing_errors_doc, clippy::exhaustive_enums, - clippy::todo, clippy::print_stderr, - clippy::partial_pub_fields, clippy::use_self, clippy::match_same_arms, reason = "Deferred" )] +#![allow( + // missing_debug_implementations, + // elided_lifetimes_in_paths, + // single_use_lifetimes, + // unnameable_types, + // unreachable_pub, + // clippy::return_self_not_must_use, + // clippy::cast_possible_truncation, + // clippy::missing_assert_message, + // clippy::shadow_unrelated, + // clippy::missing_panics_doc, + clippy::missing_errors_doc, + // clippy::exhaustive_enums, + clippy::todo, + // clippy::print_stderr, + clippy::partial_pub_fields, + // clippy::use_self, + // clippy::match_same_arms, + reason = "Deferred, only apply in some feature sets so not expect" +)] mod debug; mod recording; diff --git a/vello/src/recording.rs b/vello/src/recording.rs index c70816d71..0edebab7a 100644 --- a/vello/src/recording.rs +++ b/vello/src/recording.rs @@ -168,10 +168,6 @@ impl Recording { /// Dispatch a compute shader where the size is determined dynamically. /// The `buf` argument contains the dispatch size, 3 `u32` values beginning /// at the given byte `offset`. - #[cfg_attr( - not(feature = "debug_layers"), - expect(unused, reason = "Currently only used by the debug layers") - )] pub fn dispatch_indirect( &mut self, shader: ShaderId, diff --git a/vello/src/wgpu_engine.rs b/vello/src/wgpu_engine.rs index 148683710..f00974ed7 100644 --- a/vello/src/wgpu_engine.rs +++ b/vello/src/wgpu_engine.rs @@ -101,7 +101,13 @@ enum MaterializedBuffer { struct BindMapBuffer { buffer: MaterializedBuffer, - #[cfg_attr(not(feature = "buffer_labels"), allow(unused))] + #[cfg_attr( + not(feature = "buffer_labels"), + expect( + unused, + reason = "Useful for debugging; simplifies upstream to always provide this" + ) + )] label: &'static str, } diff --git a/vello_encoding/src/lib.rs b/vello_encoding/src/lib.rs index 57c4d702f..aa8cbed22 100644 --- a/vello_encoding/src/lib.rs +++ b/vello_encoding/src/lib.rs @@ -20,16 +20,19 @@ missing_debug_implementations, elided_lifetimes_in_paths, single_use_lifetimes, - unnameable_types, clippy::return_self_not_must_use, clippy::unseparated_literal_suffix, clippy::cast_possible_truncation, clippy::missing_assert_message, - clippy::shadow_unrelated, clippy::missing_panics_doc, - clippy::exhaustive_enums, reason = "Deferred" )] +#![allow( + unnameable_types, + clippy::shadow_unrelated, + clippy::exhaustive_enums, + reason = "Deferred, only apply in some feature sets so not expect" +)] mod binning; mod clip; diff --git a/vello_shaders/build.rs b/vello_shaders/build.rs index 2e7c6907f..62878670a 100644 --- a/vello_shaders/build.rs +++ b/vello_shaders/build.rs @@ -4,20 +4,10 @@ //! Build step. // These modules are also included in the main crate, where the items are reachable -#[allow( - clippy::allow_attributes, - unreachable_pub, - unused, - reason = "Checked elsewhere" -)] +#[allow(warnings, reason = "Checked elsewhere")] #[path = "src/compile/mod.rs"] mod compile; -#[allow( - clippy::allow_attributes, - unreachable_pub, - unused, - reason = "Checked elsewhere" -)] +#[allow(warnings, reason = "Checked elsewhere")] #[path = "src/types.rs"] mod types; @@ -67,7 +57,10 @@ fn write_shaders( shaders: &[(String, ShaderInfo)], ) -> Result<(), std::fmt::Error> { writeln!(buf, "mod generated {{")?; - writeln!(buf, " #[allow(clippy::wildcard_imports)]")?; + writeln!( + buf, + " #[expect(clippy::wildcard_imports, reason=\"Allows using Debug for codegen\")]" + )?; writeln!(buf, " use super::*;")?; writeln!(buf, " use BindType::*;")?; writeln!(buf, " pub const SHADERS: Shaders<'static> = Shaders {{")?; diff --git a/vello_shaders/src/lib.rs b/vello_shaders/src/lib.rs index 3e167546e..1cd94ce4c 100644 --- a/vello_shaders/src/lib.rs +++ b/vello_shaders/src/lib.rs @@ -32,17 +32,23 @@ #![allow(missing_docs, reason = "We have many as-yet undocumented items.")] #![expect( missing_debug_implementations, + clippy::exhaustive_enums, + reason = "Deferred" +)] +#![allow( elided_lifetimes_in_paths, + clippy::print_stdout, + clippy::print_stderr, single_use_lifetimes, unnameable_types, clippy::unseparated_literal_suffix, clippy::cast_possible_truncation, - clippy::missing_assert_message, clippy::shadow_unrelated, + clippy::missing_assert_message, clippy::missing_panics_doc, - clippy::exhaustive_enums, + clippy::missing_errors_doc, clippy::todo, - reason = "Deferred" + reason = "Deferred, only apply in some feature sets so not expect" )] mod types; diff --git a/vello_shaders/src/types.rs b/vello_shaders/src/types.rs index 76bb235e7..a7a3ef905 100644 --- a/vello_shaders/src/types.rs +++ b/vello_shaders/src/types.rs @@ -50,7 +50,7 @@ pub mod msl { } impl fmt::Debug for BindingIndex { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match *self { Self::Buffer(i) => write!(f, "msl::BindingIndex::Buffer({})", i), Self::Texture(i) => write!(f, "msl::BindingIndex::Texture({})", i),