Closed
Description
#![deny(warnings)]
#![warn(clippy::pedantic)]
struct X {}
impl X {
#[allow(clippy::unused_self, clippy::cast_possible_truncation)]
fn test(&self, a: u32) {
println!("testing {}", a as u16);
}
}
pub fn main() {
let x = X {};
x.test(1);
}
This correctly suppresses the clippy::cast_possible_truncation
warning, but fails to suppress the clippy::unused_self
.
The rust playground is currently at 0.0.212 (2019-12-29 c807fbc).
The same error is produced by clippy 0.0.212 (c8e3cfb 2019-10-28).
Older versions I have access to, such as clippy 0.0.212 (4e7e71b 2019-10-11)
don't have this lint, so it's hard to pin down.
Metadata
Metadata
Assignees
Labels
No labels