Closed
Description
In nightly-2020-03-19, an allow
attribute correctly suppresses clippy lints in out-of-line child modules. In nightly-2020-03-23 it no longer does.
src/lib.rs
#![allow(clippy::redundant_field_names)]
pub mod m;
pub struct S {
pub x: u8,
}
src/m.rs
pub fn f(x: u8) {
let _ = crate::S { x: x };
}
$ cargo +nightly-2020-03-19 clippy
Checking testing v0.0.0
Finished dev [unoptimized + debuginfo] target(s) in 0.24s
$ cargo +nightly-2020-03-23 clippy
Checking testing v0.0.0
warning: redundant field names in struct initialization
--> src/m.rs:2:24
|
2 | let _ = crate::S { x: x };
| ^^^^ help: replace it with: `x`
|
= note: `#[warn(clippy::redundant_field_names)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
Finished dev [unoptimized + debuginfo] target(s) in 0.23s
Inline modules (pub mod m { ... }
) do not appear to be affected.