Skip to content

Commit

Permalink
Fix a CI pass
Browse files Browse the repository at this point in the history
  • Loading branch information
DJMcNab committed Nov 27, 2024
1 parent 68466a9 commit 38ef5c4
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 28 deletions.
23 changes: 20 additions & 3 deletions vello/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions vello/src/recording.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<R>(
&mut self,
shader: ShaderId,
Expand Down
8 changes: 7 additions & 1 deletion vello/src/wgpu_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
9 changes: 6 additions & 3 deletions vello_encoding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
19 changes: 6 additions & 13 deletions vello_shaders/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 {{")?;
Expand Down
12 changes: 9 additions & 3 deletions vello_shaders/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion vello_shaders/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 38ef5c4

Please sign in to comment.