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

Currently, `Msrv` is cloned around a lot in order to handle the `#[clippy::msrv]` attribute. This attribute, however, means `RustcVersion` will be heap allocated if there is only one source of...

S-waiting-on-review

Fixes #13375 I've added the lint next to the other attribute-related ones. Not sure if this is the correct place, since while we are looking after the `packed`-attribute (there is...

S-waiting-on-review

### Summary If an async function (with no await statements) is passed into another function as an argument, it no longer triggers the `unused_async` lint. Believe this is a relatively...

C-bug
I-false-negative

### What it does Warns when a user writes `[here]`, `[click here]`, `[link]` or `[this link]` in a doc comment. This lint would be in the “Style” category, as I...

A-lint

### Summary I feel the new `used_underscore_items` lint is not universally applicable and would best live in `restriction` rather than `pedantic`, as there are sometimes legitimate use-cases for prefixing item...

C-bug
I-false-positive

### What it does Detects when a type visible outside the crate (and not `doc(hidden)`) has a generic parameter of any kind (type parameter, lifetime parameter, or const generic parameter),...

A-lint

Made it recognize std::ops::Add::add and std::ops::Mul::mul, as well as prevented it from adding a turbofish when it is the return value of a function with a known return type. changelog:...

S-waiting-on-review

### Summary I'm getting the MSRV lint below even though `rustc` 1.31 compiles the code without complaints. I guess this is because `slice::as_ptr()` was used via auto-dereferencing before `Vec::as_ptr()` was...

C-bug
I-false-positive

### Summary when manually dropping the lock the lint doesn't recognize, that it could be dropped earlier. it would be nice to lint that as well. ### Lint Name significant_drop_tightening...

C-bug
I-false-negative

### Summary Thanks for the wonderful Clippy. I hope this bug report is helpful. I have a C library that was translated by C2Rust and _heavily_ cleaned up by hand....

C-bug