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

Takes into consideration integer references like `&i32::MAX` because currently things like `let _ = &1 + 0` trigger the lint. changelog: [arithmetic-side-effects] Consider references

S-waiting-on-review

### Summary Additional problems were that, because of amount of generated warnings, message about broken code got scrolled outside console's buffer. Maybe there should be extra, short message about broken...

C-bug
I-suggestion-causes-error

Closes #7790 `clippy_utils::def_path_res` already resolved macro definitions which is nice, it just needed a tweak to be able to disambiguate e.g. `std::vec` the module & `std::vec` the macro, and `serde::Serialize`...

S-waiting-on-review

### What it does similar to disallowed_methods & disallowed_type ### Lint Name disallowed_module ### Category style ### Advantage _No response_ ### Drawbacks _No response_ ### Example ```rust ``` Could be...

A-lint

fixes #9221 This PR makes sure that enums or structs not implementing `PartialEq` trait but still using the `if let` patterns can be linted to be rewritten with `matches!`. If...

S-waiting-on-review

### What it does Suggest taking advantage of the `#[track_caller]` feature. It's a less-known feature of Rust, but quite useful on assert-like functions which want to point out that their...

E-medium
A-lint
L-pedantic

### What it does check function names that end _unchecked and then squark if they are not marked as unsafe. Maybe I'm totally out of line here but I think...

A-lint

### Summary you can access a reproducible example in this branch: [clippy-fix-error](https://github.com/tvallotton/models/tree/clippy-fix-error). It seems that clippy forgot to remove a semicolon but I'm not entirely sure. I ran `clippy --fix`...

C-bug
I-suggestion-causes-error

### Description Similar to how `s` allow to focus the search bar on docs.rs, it would be nice if pressing `s` would focus the filter bar. ### Additional Labels @rustbot...

Running `cargo clippy --fix` fails to fix the following code: ```rust fn f() -> i32 { { return 0; }; } ``` It tries to convert the `return 0;` into...

C-bug
I-suggestion-causes-error