diff --git a/crates/rustc_codegen_spirv/src/decorations.rs b/crates/rustc_codegen_spirv/src/decorations.rs index 0646f14d1e..6c9af42265 100644 --- a/crates/rustc_codegen_spirv/src/decorations.rs +++ b/crates/rustc_codegen_spirv/src/decorations.rs @@ -1,6 +1,10 @@ //! SPIR-V decorations specific to `rustc_codegen_spirv`, produced during //! the original codegen of a crate, and consumed by the `linker`. +// FIXME(eddyb) Remove when a fix for clippy warning in `serde` derives +// (https://github.com/rust-lang/rust-clippy/issues/6818) lands in nightly. +#![allow(clippy::use_self)] + use rspirv::dr::{Instruction, Module, Operand}; use rspirv::spirv::{Decoration, Op, Word}; use rustc_span::{source_map::SourceMap, FileName, Pos, Span}; diff --git a/crates/rustc_codegen_spirv/src/lib.rs b/crates/rustc_codegen_spirv/src/lib.rs index f1fa89a7b0..31d63a08f3 100644 --- a/crates/rustc_codegen_spirv/src/lib.rs +++ b/crates/rustc_codegen_spirv/src/lib.rs @@ -28,8 +28,7 @@ //clippy::enum_glob_use, clippy::pub_enum_variant_names, clippy::mem_forget, - // See: https://github.com/EmbarkStudios/rust-gpu/issues/459 - // clippy::use_self, + clippy::use_self, clippy::filter_map_next, clippy::needless_continue, clippy::needless_borrow, diff --git a/crates/rustc_codegen_spirv/src/linker/specializer.rs b/crates/rustc_codegen_spirv/src/linker/specializer.rs index e83fd51c4e..b29e4796ab 100644 --- a/crates/rustc_codegen_spirv/src/linker/specializer.rs +++ b/crates/rustc_codegen_spirv/src/linker/specializer.rs @@ -290,7 +290,7 @@ impl TryFrom<&Operand> for CopyOperand { } impl From for Operand { - fn from(op: CopyOperand) -> Operand { + fn from(op: CopyOperand) -> Self { match op { CopyOperand::IdRef(id) => Self::IdRef(id), CopyOperand::StorageClass(s) => Self::StorageClass(s), @@ -325,8 +325,6 @@ enum Value { SameAs(T), } -// FIXME(eddyb) clippy bug suggests `Self` even when it'd be a type mismatch. -#[allow(clippy::use_self)] impl Value { fn map_var(self, f: impl FnOnce(T) -> U) -> Value { match self { @@ -363,8 +361,6 @@ struct Instance { generic_args: GA, } -// FIXME(eddyb) clippy bug suggests `Self` even when it'd be a type mismatch. -#[allow(clippy::use_self)] impl Instance { fn as_ref(&self) -> Instance<&GA> { Instance { diff --git a/crates/rustc_codegen_spirv/src/symbols.rs b/crates/rustc_codegen_spirv/src/symbols.rs index f8e7cdcc33..1377847b5d 100644 --- a/crates/rustc_codegen_spirv/src/symbols.rs +++ b/crates/rustc_codegen_spirv/src/symbols.rs @@ -323,8 +323,6 @@ const EXECUTION_MODES: &[(&str, ExecutionMode, ExecutionModeExtraDim)] = { ] }; -// FIXME(eddyb) clippy bug suggests `Self` even when it couldn't possibly work. -#[allow(clippy::use_self)] impl Symbols { fn new() -> Self { let builtins = BUILTINS