diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7938cfccc..8c331aca6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ env: # If the compilation fails, then the version specified here needs to be bumped up to reality. # Be sure to also update the rust-version property in the workspace Cargo.toml file, # plus all the README.md files of the affected packages. - RUST_MIN_VER: "1.76" + RUST_MIN_VER: "1.82" # List of packages that will be checked with the minimum supported Rust version. # This should be limited to packages that are intended for publishing. RUST_MIN_VER_PKGS: "-p vello -p vello_encoding -p vello_shaders" diff --git a/CHANGELOG.md b/CHANGELOG.md index 0982f03c8..938335202 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,11 +13,11 @@ You can find its changes [documented below](#030---2024-10-04). ## [Unreleased] -This release has an [MSRV][] of 1.76. +This release has an [MSRV][] of 1.82. ### Changed -- Breaking: Updated `wgpu` to 23.0.1, increased MSRV to 1.76 ([#735][], [#743][] by [@waywardmonkeys]) +- Breaking: Updated `wgpu` to 23.0.1 ([#735][], [#743][] by [@waywardmonkeys]) ### Fixed diff --git a/Cargo.toml b/Cargo.toml index 473192554..d2c4e87f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ version = "0.3.0" edition = "2021" # Keep in sync with RUST_MIN_VER in .github/workflows/ci.yml, with the relevant README.md files # and with the MSRV in the `Unreleased` section of CHANGELOG.md. -rust-version = "1.76" +rust-version = "1.82" license = "Apache-2.0 OR MIT" repository = "https://github.com/linebender/vello" @@ -63,7 +63,9 @@ clippy.dbg_macro = "warn" clippy.debug_assert_with_mut_call = "warn" clippy.doc_markdown = "warn" clippy.exhaustive_enums = "warn" -clippy.fn_to_numeric_cast_any = "warn" # Can't be forbid due to 'scenes' requiring an exception. +# Break from the lint set due to https://github.com/rust-lang/rust/issues/133346#issuecomment-2503567552 +# and our use of clap. +clippy.fn_to_numeric_cast_any = "deny" clippy.infinite_loop = "warn" clippy.large_include_file = "warn" clippy.large_stack_arrays = "warn" diff --git a/README.md b/README.md index acb7c28aa..44f9a2efe 100644 --- a/README.md +++ b/README.md @@ -231,7 +231,7 @@ VELLO_STATIC_LOG="vello=trace" VELLO_STATIC_ARGS="--test-scenes" cargo apk run - ## Minimum supported Rust Version (MSRV) -This version of Vello has been verified to compile with **Rust 1.76** and later. +This version of Vello has been verified to compile with **Rust 1.82** and later. Future versions of Vello might increase the Rust version requirement. It will not be treated as a breaking change and as such can even happen with small patch releases. diff --git a/examples/scenes/src/lib.rs b/examples/scenes/src/lib.rs index 06e21d79a..3248a1bc8 100644 --- a/examples/scenes/src/lib.rs +++ b/examples/scenes/src/lib.rs @@ -22,8 +22,7 @@ clippy::use_self, clippy::match_same_arms, clippy::allow_attributes_without_reason, - clippy::allow_attributes, - clippy::fn_to_numeric_cast_any + clippy::allow_attributes )] mod images; diff --git a/examples/scenes/src/test_scenes.rs b/examples/scenes/src/test_scenes.rs index 583188071..9e3e60542 100644 --- a/examples/scenes/src/test_scenes.rs +++ b/examples/scenes/src/test_scenes.rs @@ -882,7 +882,10 @@ mod impls { params.resolution = Some((1200.0, 1200.0).into()); } - #[allow(clippy::too_many_arguments)] + #[expect( + clippy::too_many_arguments, + reason = "This function is internal, so the argument count doesn't cause issues for consumers." + )] pub(super) fn two_point_radial(scene: &mut Scene, _params: &mut SceneParams) { pub(super) fn make( scene: &mut Scene, diff --git a/examples/with_winit/src/stats.rs b/examples/with_winit/src/stats.rs index bd4b12ec8..687803e57 100644 --- a/examples/with_winit/src/stats.rs +++ b/examples/with_winit/src/stats.rs @@ -25,7 +25,10 @@ pub struct Snapshot { } impl Snapshot { - #[allow(clippy::too_many_arguments)] + #[expect( + clippy::too_many_arguments, + reason = "This function is internal, so the argument count doesn't cause issues for consumers." + )] pub fn draw_layer<'a, T>( &self, scene: &mut Scene, diff --git a/vello/README.md b/vello/README.md index cb5f87278..2e47cd72a 100644 --- a/vello/README.md +++ b/vello/README.md @@ -220,7 +220,7 @@ VELLO_STATIC_LOG="vello=trace" VELLO_STATIC_ARGS="--test-scenes" cargo apk run - ## Minimum supported Rust Version (MSRV) -This version of Vello has been verified to compile with **Rust 1.76** and later. +This version of Vello has been verified to compile with **Rust 1.82** and later. Future versions of Vello might increase the Rust version requirement. It will not be treated as a breaking change and as such can even happen with small patch releases. diff --git a/vello/src/debug/renderer.rs b/vello/src/debug/renderer.rs index 139de1821..0d50430d3 100644 --- a/vello/src/debug/renderer.rs +++ b/vello/src/debug/renderer.rs @@ -1,9 +1,11 @@ // Copyright 2023 the Vello Authors // SPDX-License-Identifier: Apache-2.0 OR MIT -// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that -#[allow(unused_imports)] -use core::mem::size_of; +#![expect( + clippy::allow_attributes, + clippy::allow_attributes_without_reason, + reason = "Generated by derive macro" +)] use super::DebugLayers; use crate::{ @@ -211,8 +213,10 @@ impl DebugRenderer { } } - #[allow(clippy::too_many_arguments)] - // #[expect(clippy::too_many_arguments, reason="This function is internal, so the argument count doesn't cause issues for consumers.")] + #[expect( + clippy::too_many_arguments, + reason = "This function is internal, so the argument count doesn't cause issues for consumers." + )] pub fn render( &self, recording: &mut Recording, diff --git a/vello/src/debug/validate.rs b/vello/src/debug/validate.rs index d3bd6e5d3..b570f8d6c 100644 --- a/vello/src/debug/validate.rs +++ b/vello/src/debug/validate.rs @@ -1,6 +1,12 @@ // Copyright 2023 the Vello Authors // SPDX-License-Identifier: Apache-2.0 OR MIT +#![expect( + clippy::allow_attributes, + clippy::allow_attributes_without_reason, + reason = "Generated by derive macro" +)] + use { bytemuck::{Pod, Zeroable}, std::{collections::BTreeSet, fmt}, diff --git a/vello/src/lib.rs b/vello/src/lib.rs index 1e7760ce3..480f99122 100644 --- a/vello/src/lib.rs +++ b/vello/src/lib.rs @@ -92,13 +92,14 @@ // The following lints are part of the Linebender standard set, // but resolving them has been deferred for now. // Feel free to send a PR that solves one or more of these. -#![allow( +// Allow because of: https://github.com/rust-lang/rust/pull/130025 +#![allow(missing_docs, reason = "We have many as-yet undocumented items.")] +#![expect( missing_debug_implementations, elided_lifetimes_in_paths, single_use_lifetimes, unnameable_types, unreachable_pub, - missing_docs, clippy::return_self_not_must_use, clippy::cast_possible_truncation, clippy::missing_assert_message, @@ -110,13 +111,10 @@ clippy::print_stderr, clippy::partial_pub_fields, clippy::use_self, - clippy::match_same_arms + clippy::match_same_arms, + reason = "Deferred" )] -// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that -#[allow(unused_imports)] -use core::mem::size_of; - mod debug; mod recording; mod render; @@ -321,7 +319,10 @@ pub enum Error { ShaderCompilation(#[from] vello_shaders::compile::ErrorVec), } -#[allow(dead_code)] // this can be unused when wgpu feature is not used +#[cfg_attr( + not(feature = "wgpu"), + expect(dead_code, reason = "this can be unused when wgpu feature is not used") +)] pub(crate) type Result = std::result::Result; /// Renders a scene into a texture or surface. @@ -331,7 +332,13 @@ pub(crate) type Result = std::result::Result; /// This is an assumption which is known to be limiting, and is planned to change. #[cfg(feature = "wgpu")] pub struct Renderer { - #[cfg_attr(not(feature = "hot_reload"), allow(dead_code))] + #[cfg_attr( + not(feature = "hot_reload"), + expect( + dead_code, + reason = "Options are only used to reinitialise on a hot reload" + ) + )] options: RendererOptions, engine: WgpuEngine, resolver: Resolver, diff --git a/vello/src/recording.rs b/vello/src/recording.rs index 503d65cdb..c70816d71 100644 --- a/vello/src/recording.rs +++ b/vello/src/recording.rs @@ -168,7 +168,10 @@ 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`. - #[allow(unused)] + #[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/render.rs b/vello/src/render.rs index fd31574dd..521554b4a 100644 --- a/vello/src/render.rs +++ b/vello/src/render.rs @@ -3,10 +3,6 @@ //! Take an encoded scene and create a graph to render it -// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that -#[allow(unused_imports)] -use core::mem::size_of; - use crate::recording::{BufferProxy, ImageFormat, ImageProxy, Recording, ResourceProxy}; use crate::shaders::FullShaders; use crate::{AaConfig, RenderParams}; diff --git a/vello/src/util.rs b/vello/src/util.rs index cbc1c5b83..beb0efe4e 100644 --- a/vello/src/util.rs +++ b/vello/src/util.rs @@ -25,7 +25,10 @@ pub struct DeviceHandle { } impl RenderContext { - #[allow(clippy::new_without_default)] + #[expect( + clippy::new_without_default, + reason = "Creating a wgpu Instance is something which should only be done rarely" + )] pub fn new() -> Self { let instance = Instance::new(wgpu::InstanceDescriptor { backends: wgpu::util::backend_bits_from_env().unwrap_or(wgpu::Backends::PRIMARY), @@ -137,7 +140,13 @@ impl RenderContext { .await?; let features = adapter.features(); let limits = Limits::default(); - #[allow(unused_mut)] + #[cfg_attr( + not(feature = "wgpu-profiler"), + expect( + unused_mut, + reason = "Mutation is only expected with the wgpu-profiler feature" + ) + )] let mut maybe_features = wgpu::Features::CLEAR_TEXTURE; #[cfg(feature = "wgpu-profiler")] { diff --git a/vello/src/wgpu_engine.rs b/vello/src/wgpu_engine.rs index 1c8016ced..148683710 100644 --- a/vello/src/wgpu_engine.rs +++ b/vello/src/wgpu_engine.rs @@ -70,7 +70,6 @@ enum ShaderKind<'a> { } struct Shader { - #[allow(dead_code)] label: &'static str, wgpu: Option, cpu: Option, @@ -89,7 +88,7 @@ impl Shader { } pub(crate) enum ExternalResource<'a> { - #[allow(unused)] + #[expect(unused, reason = "No buffers are accepted as arguments currently")] Buffer(BufferProxy, &'a Buffer), Image(ImageProxy, &'a TextureView), } @@ -303,7 +302,10 @@ impl WgpuEngine { }) } - #[allow(clippy::too_many_arguments)] + #[expect( + clippy::too_many_arguments, + reason = "This function is internal, so the argument count doesn't cause issues for consumers." + )] pub fn add_render_shader( &mut self, device: &Device, @@ -936,7 +938,14 @@ impl ResourcePool { fn get_buf( &mut self, size: u64, - #[allow(unused)] name: &'static str, + #[cfg_attr( + not(feature = "buffer_labels"), + expect( + unused, + reason = "Debugging argument always present but only consumed when debugging feature enabled" + ) + )] + name: &'static str, usage: BufferUsages, device: &Device, ) -> Buffer { @@ -1041,7 +1050,10 @@ impl<'a> TransientBindMap<'a> { .expect("texture not materialized") } - #[allow(clippy::too_many_arguments)] + #[expect( + clippy::too_many_arguments, + reason = "This function is internal, so the argument count doesn't cause issues for consumers." + )] fn create_bind_group( &mut self, bind_map: &mut BindMap, diff --git a/vello_encoding/README.md b/vello_encoding/README.md index 03d5aaafd..c76d1fdeb 100644 --- a/vello_encoding/README.md +++ b/vello_encoding/README.md @@ -20,7 +20,7 @@ Significant changes are documented in [the changelog]. ## Minimum supported Rust Version (MSRV) -This version of Vello Encoding has been verified to compile with **Rust 1.76** and later. +This version of Vello Encoding has been verified to compile with **Rust 1.82** and later. Future versions of Vello Encoding might increase the Rust version requirement. It will not be treated as a breaking change and as such can even happen with small patch releases. @@ -35,6 +35,7 @@ If you encounter a compilation issue due to a dependency and don't want to upgra # Use the problematic dependency's name and version cargo update -p package_name --precise 0.1.1 ``` + ## Community diff --git a/vello_encoding/src/clip.rs b/vello_encoding/src/clip.rs index 52cd80671..228d7acf5 100644 --- a/vello_encoding/src/clip.rs +++ b/vello_encoding/src/clip.rs @@ -22,7 +22,10 @@ pub struct ClipBic { /// Clip element. #[derive(Copy, Clone, Pod, Zeroable, Debug, Default)] #[repr(C)] -#[allow(clippy::partial_pub_fields)] +#[expect( + clippy::partial_pub_fields, + reason = "Padding is meaningless to manipulate directly" +)] pub struct ClipElement { pub parent_ix: u32, _padding: [u8; 12], diff --git a/vello_encoding/src/config.rs b/vello_encoding/src/config.rs index 3d0b2ba8b..8f155498f 100644 --- a/vello_encoding/src/config.rs +++ b/vello_encoding/src/config.rs @@ -1,10 +1,6 @@ // Copyright 2023 the Vello Authors // SPDX-License-Identifier: Apache-2.0 OR MIT -// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that -#[allow(unused_imports)] -use core::mem::size_of; - use crate::SegmentCount; use super::{ @@ -304,7 +300,7 @@ impl BufferSize { } /// Returns the number of elements. - #[allow(clippy::len_without_is_empty)] + #[expect(clippy::len_without_is_empty, reason = "The buffer can never be empty")] pub const fn len(self) -> u32 { self.len } diff --git a/vello_encoding/src/lib.rs b/vello_encoding/src/lib.rs index cc792422e..57c4d702f 100644 --- a/vello_encoding/src/lib.rs +++ b/vello_encoding/src/lib.rs @@ -14,20 +14,21 @@ // The following lints are part of the Linebender standard set, // but resolving them has been deferred for now. // Feel free to send a PR that solves one or more of these. -#![allow( +// Allow because of: https://github.com/rust-lang/rust/pull/130025 +#![allow(missing_docs, reason = "We have many as-yet undocumented items.")] +#![expect( missing_debug_implementations, elided_lifetimes_in_paths, single_use_lifetimes, unnameable_types, - missing_docs, - variant_size_differences, 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 + clippy::exhaustive_enums, + reason = "Deferred" )] mod binning; diff --git a/vello_encoding/src/math.rs b/vello_encoding/src/math.rs index 14432bed4..8989698af 100644 --- a/vello_encoding/src/math.rs +++ b/vello_encoding/src/math.rs @@ -72,7 +72,6 @@ impl Mul for Transform { } } -#[allow(dead_code)] pub fn point_to_f32(point: kurbo::Point) -> [f32; 2] { [point.x as f32, point.y as f32] } diff --git a/vello_encoding/src/path.rs b/vello_encoding/src/path.rs index 8d9423ac8..06ac051af 100644 --- a/vello_encoding/src/path.rs +++ b/vello_encoding/src/path.rs @@ -1,10 +1,6 @@ // Copyright 2022 the Vello Authors // SPDX-License-Identifier: Apache-2.0 OR MIT -// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that -#[allow(unused_imports)] -use core::mem::size_of; - use bytemuck::{Pod, Zeroable}; use peniko::kurbo::{Cap, Join, Shape, Stroke}; use peniko::Fill; @@ -394,7 +390,10 @@ pub struct PathBbox { /// Tiled path object. #[derive(Copy, Clone, Pod, Zeroable, Debug, Default)] #[repr(C)] -#[allow(clippy::partial_pub_fields)] +#[expect( + clippy::partial_pub_fields, + reason = "Padding is meaningless to manipulate directly" +)] pub struct Path { /// Bounding box in tiles. pub bbox: [u32; 4], diff --git a/vello_encoding/src/resolve.rs b/vello_encoding/src/resolve.rs index 50f81ba57..44a98aa1f 100644 --- a/vello_encoding/src/resolve.rs +++ b/vello_encoding/src/resolve.rs @@ -1,10 +1,6 @@ // Copyright 2022 the Vello Authors // SPDX-License-Identifier: Apache-2.0 OR MIT -// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that -#[allow(unused_imports)] -use core::mem::size_of; - use bytemuck::{Pod, Zeroable}; use super::{DrawTag, Encoding, PathTag, StreamOffsets, Style, Transform}; diff --git a/vello_shaders/README.md b/vello_shaders/README.md index bb340efd6..d402b70f4 100644 --- a/vello_shaders/README.md +++ b/vello_shaders/README.md @@ -24,7 +24,7 @@ Significant changes are documented in [the changelog]. ## Minimum supported Rust Version (MSRV) -This version of Vello Shaders has been verified to compile with **Rust 1.76** and later. +This version of Vello Shaders has been verified to compile with **Rust 1.82** and later. Future versions of Vello Shaders might increase the Rust version requirement. It will not be treated as a breaking change and as such can even happen with small patch releases. @@ -39,6 +39,7 @@ If you encounter a compilation issue due to a dependency and don't want to upgra # Use the problematic dependency's name and version cargo update -p package_name --precise 0.1.1 ``` + ## Community diff --git a/vello_shaders/build.rs b/vello_shaders/build.rs index cc70bd9b0..2e7c6907f 100644 --- a/vello_shaders/build.rs +++ b/vello_shaders/build.rs @@ -4,10 +4,20 @@ //! Build step. // These modules are also included in the main crate, where the items are reachable -#[allow(unreachable_pub, unused)] +#[allow( + clippy::allow_attributes, + unreachable_pub, + unused, + reason = "Checked elsewhere" +)] #[path = "src/compile/mod.rs"] mod compile; -#[allow(unreachable_pub, unused)] +#[allow( + clippy::allow_attributes, + unreachable_pub, + unused, + reason = "Checked elsewhere" +)] #[path = "src/types.rs"] mod types; diff --git a/vello_shaders/src/compile/mod.rs b/vello_shaders/src/compile/mod.rs index 772fa35f9..db18352f8 100644 --- a/vello_shaders/src/compile/mod.rs +++ b/vello_shaders/src/compile/mod.rs @@ -2,11 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 OR MIT // Pending on https://github.com/rust-lang/rust-clippy/pull/13677 -#![allow(clippy::shadow_unrelated)] -// The following lints are part of the Linebender standard set, -// but resolving them has been deferred for now. -// Feel free to send a PR that solves one or more of these. -#![allow(clippy::missing_assert_message, clippy::missing_errors_doc)] +#![expect( + clippy::shadow_unrelated, + reason = "https://github.com/rust-lang/rust-clippy/pull/13677" +)] use naga::front::wgsl; use naga::valid::{Capabilities, ModuleInfo, ValidationError, ValidationFlags}; diff --git a/vello_shaders/src/cpu.rs b/vello_shaders/src/cpu.rs index dde7928fc..89be76c1b 100644 --- a/vello_shaders/src/cpu.rs +++ b/vello_shaders/src/cpu.rs @@ -7,8 +7,11 @@ //! a full CPU fallback as an alternative to GPU shaders is not provided. // Allow un-idiomatic Rust to more closely match shaders -#![allow(clippy::needless_range_loop)] -#![allow(clippy::too_many_arguments)] +#![expect( + clippy::needless_range_loop, + clippy::too_many_arguments, + reason = "Keeps code easily comparable to GPU shaders" +)] mod backdrop; mod bbox_clear; @@ -56,7 +59,6 @@ use bytemuck::Pod; pub enum CpuBinding<'a> { Buffer(&'a [u8]), BufferRW(&'a RefCell>), - #[allow(unused)] Texture(&'a CpuTexture), } @@ -66,7 +68,6 @@ pub enum TypedBufGuard<'a, T: ?Sized> { } pub enum TypedBufGuardMut<'a, T: ?Sized> { - #[allow(dead_code)] Slice(&'a mut T), Interior(RefMut<'a, T>), } @@ -148,7 +149,6 @@ impl<'a> CpuBinding<'a> { } // TODO: same guard as buf to make mutable - #[allow(unused)] pub fn as_tex(&self) -> &CpuTexture { match self { CpuBinding::Texture(t) => t, diff --git a/vello_shaders/src/cpu/euler.rs b/vello_shaders/src/cpu/euler.rs index fbe0bbea2..ddf0bc7d0 100644 --- a/vello_shaders/src/cpu/euler.rs +++ b/vello_shaders/src/cpu/euler.rs @@ -3,8 +3,10 @@ //! Utility functions for Euler Spiral based stroke expansion. -// Use the same constants as the f64 version. -#![allow(clippy::excessive_precision)] +#![expect( + clippy::excessive_precision, + reason = "Uses the same constants as the f64 version" +)] use super::util::Vec2; use std::f32::consts::FRAC_PI_4; @@ -217,7 +219,7 @@ impl EulerSeg { Self { p0, p1, params } } - #[allow(unused)] + #[expect(unused, reason = "Unclear why this code exists")] pub(crate) fn eval(&self, t: f32) -> Vec2 { let Vec2 { x, y } = self.params.eval(t); let chord = self.p1 - self.p0; diff --git a/vello_shaders/src/cpu/fine.rs b/vello_shaders/src/cpu/fine.rs index 0636e24ee..3b6bd3b5b 100644 --- a/vello_shaders/src/cpu/fine.rs +++ b/vello_shaders/src/cpu/fine.rs @@ -108,9 +108,7 @@ fn fill_path(area: &mut [f32], segments: &[PathSegment], fill: &CmdFill, x_tile: } } -// Note: this is a draft. Texture resources are not yet wired up, so it -// has not yet been tested. -#[allow(unused)] +#[expect(unused, reason = "Draft code as textures not wired up")] fn fine_main( config: &ConfigUniform, tiles: &[Tile], diff --git a/vello_shaders/src/cpu/flatten.rs b/vello_shaders/src/cpu/flatten.rs index b298de8dd..d4e51d251 100644 --- a/vello_shaders/src/cpu/flatten.rs +++ b/vello_shaders/src/cpu/flatten.rs @@ -1,10 +1,6 @@ // Copyright 2023 the Vello Authors // SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense -// size_of is not part of the prelude until Rust 1.80 and our MSRV is below that -#[allow(unused_imports)] -use core::mem::size_of; - use std::f32::consts::FRAC_1_SQRT_2; use super::{ diff --git a/vello_shaders/src/lib.rs b/vello_shaders/src/lib.rs index 8dfc42f86..3e167546e 100644 --- a/vello_shaders/src/lib.rs +++ b/vello_shaders/src/lib.rs @@ -28,12 +28,13 @@ // The following lints are part of the Linebender standard set, // but resolving them has been deferred for now. // Feel free to send a PR that solves one or more of these. -#![allow( +// Allow because of: https://github.com/rust-lang/rust/pull/130025 +#![allow(missing_docs, reason = "We have many as-yet undocumented items.")] +#![expect( missing_debug_implementations, elided_lifetimes_in_paths, single_use_lifetimes, unnameable_types, - missing_docs, clippy::unseparated_literal_suffix, clippy::cast_possible_truncation, clippy::missing_assert_message, @@ -41,7 +42,7 @@ clippy::missing_panics_doc, clippy::exhaustive_enums, clippy::todo, - clippy::print_stderr + reason = "Deferred" )] mod types; diff --git a/vello_shaders/src/types.rs b/vello_shaders/src/types.rs index 2b2cd05f2..76bb235e7 100644 --- a/vello_shaders/src/types.rs +++ b/vello_shaders/src/types.rs @@ -3,11 +3,6 @@ //! Types that are shared between the main crate and build. -// The following lints are part of the Linebender standard set, -// but resolving them has been deferred for now. -// Feel free to send a PR that solves one or more of these. -#![allow(elided_lifetimes_in_paths)] - /// The type of resource that will be bound to a slot in a shader. #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum BindType { @@ -25,10 +20,6 @@ pub enum BindType { } impl BindType { - // TODO: This is a public method, which means it definitely is not - // "dead code". However, rustc seems insitent that it is, and so to not - // block forward progress, I shall humour it - #[allow(dead_code)] pub fn is_mutable(self) -> bool { matches!(self, Self::Buffer | Self::Image) }