We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider this simple project:
lib.rs:
#![allow(clippy::redundant_field_names)] pub mod inner;
inner.rs:
pub struct Foo { pub field: i32, } pub fn bar() -> Foo { let field = 0; Foo { field: field, } }
Running cargo clippy using stable 1.44.0 results in a redundant field name lint even though that lint has been disabled at the crate level:
cargo clippy
Checking foo v0.1.0 (/Users/sfackler/foo) warning: redundant field names in struct initialization --> src/inner.rs:8:9 | 8 | field: field, | ^^^^^^^^^^^^ help: replace it with: `field` | = 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
This does not happen with earlier 1.43.1 or other earlier releases.
If the module definition is inlined into lib.rs, the lint does not trigger:
#![allow(clippy::redundant_field_names)] pub mod inner { pub struct Foo { pub field: i32, } pub fn bar() -> Foo { let field = 0; Foo { field: field, } } }
The text was updated successfully, but these errors were encountered:
Duplicate of #5356
Sorry, something went wrong.
Fixed in #5651
No branches or pull requests
Consider this simple project:
lib.rs:
inner.rs:
Running
cargo clippy
using stable 1.44.0 results in a redundant field name lint even though that lint has been disabled at the crate level:This does not happen with earlier 1.43.1 or other earlier releases.
If the module definition is inlined into lib.rs, the lint does not trigger:
The text was updated successfully, but these errors were encountered: