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.
Activity
flip1995 commentedon Mar 23, 2020
Is this specific for the
redundant_field_names
lint or does this issue apply to other lints, too?dtolnay commentedon Apr 23, 2020
Based on #5515, possibly specific to redundant_field_names. I haven't tested every other lint but I haven't noticed it for others.
Rollup merge of rust-lang#5518 - flip1995:less_pre_expansion, r=phansch
Auto merge of #5651 - ebroto:names_as_early_passes, r=flip1995
Auto merge of rust-lang#73424 - Mark-Simulacrum:stable-next, r=Mark-S…
Upgrade to rust version 1.44.1.
fix: clippy lint that ONLY happens in gh actions??