rust-clippy icon indicating copy to clipboard operation
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/

Results 741 rust-clippy issues
Sort by recently updated
recently updated
newest added

### Summary If I have a proc macro attribute, that's part of the `disallowed-macros` list, and I add an `#[allow(clippy::disallowed_macros)]` on top of usage of the macro, Clippy still detects...

C-bug
I-false-positive

Fixes #10195. changelog: Add new `literal_string_with_formatting_arg` lint

S-waiting-on-review

### Description It's fiddly to configure a ton of defaults. It would be nice if clippy, possibly in coordination with the rest of the toolchain, supported some way to specify...

C-an-interesting-project

This code is an infinite loop: (Do not run this in [playpen][1]) ```rust fn main() { let a = [1, 2, 3]; while let Some(&x) = a.iter().next() { println!("{:?}", x);...

good-first-issue
A-lint
L-correctness
L-suggestion

### Summary The lint should trigger in presence of an `exit` call except when the call is in the `main` function. The lint works fine unless you include the test...

C-bug
I-false-positive

An idea is to add a switch to Clippy to make it generate a Coccinelle file that fixes a good part of the problems that Clippy has found in a...

### What it does In actual development, I often see unsafe blocks of code that are abused. For example, in one version of the Smallvec library there is a function...

A-lint

This PR adds a new page to the book for more granular, "light" lint groups that are more informal than the real groups and can be easily added by anyone...

S-waiting-on-review

`.map_or(false, f)` on a `Option` or a `Result` was not detected by `manual_is_variant_and`. This change is small (first commit), but induces a lot of (rightful) fixes (second commit) in Clippy...

S-waiting-on-review

### Summary I have `cargo clippy -- -Dwarnings` correctly fail on warnings. However, `cargo clippy --fix -- -Dwarnings` succeeds on warnings (that is, exists with 0 error code). I'm not...

C-bug