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

### Description Dear maintainers, Whenever using one of the `disallowed-*` lints, one may only specify what is to be enabled, but very little is provided to conditionally disable. This makes...

C-enhancement
A-ui
L-restriction

To avoid false positives, the `range_plus_one` and `range_minus_one` lints will restrict themselves to situations where the iterator types can be easily switched from exclusive to inclusive or vice-versa. This includes...

S-waiting-on-review

This is a newly added triagebot capability, which allows registering and then resolving concerns with an issue or a pull request. The concerns are gathered by Triagebot in the issue/PR...

S-waiting-on-review

This lint detects parsing of string literals into IP addresses when they are known correct. changelog: [`parsed_string_literals`]: new lint Inspired by [this Zulip comment](https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/.23.5Binline.5D.20on.20IpAddr.20parsing).

S-waiting-on-review

Fixes rust-lang/rust-clippy#14789 changelog: [`redundant_closure`], [`redundant_closure_for_method_calls`]: allow lint to be allowed or expected on the closure expression itself

S-waiting-on-review

This PR supersedes #14328 following the [2025-03-18 Clippy meeting discussion](https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/Meeting.202025-03-18/with/506527762). It uses a simpler approach than what was proposed initially in #14328 and does not add new options. First, it...

S-waiting-on-review

This requires making the `deref_addrof` lint a late lint instead of an early lint to check for types. changelog: [`deref_addrof`]: do not suggest implicit `DerefMut` on `ManuallyDrop` union fields Fix...

S-waiting-on-review

### Summary Clippy tries to replace a closure in the form of `|x| y(x)` with `y`, but that fails because y can only be called as a function through the...

C-bug
I-false-positive

### What it does In the wild I've seen people explain Rust using while loops where a basic for loop suffices (https://mmhaskell.com/blog/2025/6/9/spatial-reasoning-with-zigzag-patterns ). So I think Clippy could suggest to...

A-lint

### Summary It seems that `disallowed-methods`' `replacement` is pasted in as an opaque string, which stops it working for different method call syntaxes. ### Reproducer I tried this code: ```rust...

C-bug
I-suggestion-causes-error