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 481 rust-clippy issues
Sort by recently updated
recently updated
newest added

### What it does If a [`[patch]`](https://dd.slack.com/archives/C6YASP83Z/p1718996248730329) section is used to override a dependency, it is only applicable to the current crate. Dependencies ignore this. If a library tries to...

A-lint

Two axes were improved (one per commit): - Logging - Fixing `--fix` flag About logging, I'm open to other form and crates to use, my main point was to actually...

S-waiting-on-review

Close #12934 As discussed at #12934 name `thread_local_initializer_can_be_made_const` sounds against convention for other lints which describe the issue/wrong code but not suggestion and it is quite long. The new name...

S-waiting-on-review

### What it does It would be great if clippy could somehow try to const-eval expressions in conditions and warn if they always return true/false. ### Lint Name ? ###...

A-lint

### Summary If `f()` is too expensive to compute eagerly, then of course `f() + 1` must be too. However `x.unwrap_or(f())` triggers `or_fun_call`, but `x.unwrap_or(f() + 1)` does not. ###...

C-bug
I-false-negative

Closes #10646 This lint checks for panicking unwrap methods (`unwrap`, `unwrap_unchecked`, `expect`) used after `get_or_insert_with`. changelog: new lint: [`manual_option_folding`]

S-waiting-on-author

This lint makes Clippy warn about situations where an owned struct is essentially recreated by moving all its fields into a new instance of the struct. The lint is not...

S-waiting-on-review

This patch adds a new lint that checks for potentially harder to read byte char slices: `&[b'a', b'b']` and suggests to replace them with the easier to read `b"ab"` form....

S-final-comment-period

This commit fixes a bug introduced in #12706, where the behavior of the lint has been changed, to avoid suggestions that introduce a move. The motivation in the commit message...

S-waiting-on-review

### Summary `clippy::explicit_auto_deref` falsely triggers when an ampersand is present. Its suggestion does not compile. This issue seems to be related to #9841 ### Lint Name clippy::explicit_auto_deref ### Reproducer ```rust...

C-bug
I-suggestion-causes-error
I-false-positive