rust-clippy
rust-clippy copied to clipboard
A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
# Summary Putting `#![allow(clippy::non_minimal_cfg)]` at the top of the module, or on the mod statement, sometimes doesn't work! ### Lint Name non_minimal_cfg ## To reproduce ### `Cargo toml` ```toml [package]...
### Summary I propose that the `clippy::struct_field_names` lint, which checks for struct fields whose names share words with the struct's name, check the type name of the struct field—and forego...
### Summary The double_must_use message is: ``` warning: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]` ``` However, I don't know what an...
### What it does Give a warning when doing possibly unwanted &dyn Any coercion from a Box ### Advantage - Less headache figuring out why the Any is of wrong...
### Summary This lint fires for any continuation that isn't indented as much as rustdoc thinks. But, a one-character-less indent for a bulleted list is wholly unambiguous and doesn't pose...
This PR is to resolve duplicate diag messages for the renamed_builtin_attr UI test which is related to: #12379 This was caused by multiple functions calling the get_attr function resulting in...
partially fix: #12895 cc: @pitaj This only checks for `once_cell::sync::Lazy`, I want to split the implementations to at least 2 prs, as ~~checking `lazy_static!` might needs `EarlyPass` to be done...
Now, instead of manually using variables in visitors to signify that a visit is "done" and that the visitor should stop traversing. We use the trait type "Result" to signify...
This is currently draft as I am unsure about how to go with fixing this. I don't completely understand the code D:, but I've identified the issue more or less....
fixes: #12338 --- changelog: fix [`infinite_loop`] suggestions on async funtion/closure