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

fixes #4205 Adds a lint named [`confusing_xor_and_pow`], it warns the user when `a ^ b` is used as the `.pow()` function, it doesn't warn for Hex, Binary... etc. --- changelog:...

S-waiting-on-review

### Summary If let expression that produces a result is suggested to change to `?`, changing the semantics of the code ### Lint Name question_mark ### Reproducer **I tried [this](https://play.integer32.com/?version=stable&mode=debug&edition=2021&gist=9959851def574b60f276213e7dc01c6e)...

C-bug
I-false-positive

Thank you for making Clippy better! We're collecting our changelog from pull request descriptions. If your PR only includes internal changes, you can just write `changelog: none`. Otherwise, please write...

S-waiting-on-review

### What it does Catches the places where `clone_from` could be used instead ### Lint Name clone_from_candidate ### Category pedantic ### Advantage From the [docs](https://doc.rust-lang.org/std/clone/trait.Clone.html#method.clone_from) - `a.clone_from(&b)` is equivalent to...

A-lint

r? @ghost changelog: none

fix #8336, fix #8156, fix #9192, fix https://github.com/rust-lang/rust-clippy/issues/9503 changelog: [`needless_return`] Recursively remove unneeded semicolons For now the suggestion about removing the semicolons are hidden because they would be very noisy...

S-waiting-on-review

r? @matthiaskrgr This just adds the mode without changing how a regular run works Takes a fair bit longer to run than a `-j4` or regular run ``` cargo lintcheck...

S-waiting-on-review

Clippy reported error during auto fix ``` ❯ cargo clippy --workspace --all-features --fix --allow-dirty --broken-code -- -D clippy::all -D clippy::pedantic -D clippy::nursery -D clippy::cargo Checking ril v0.1.0 (C:\Users\alvin\OneDrive\Desktop\repos\ril) warning: failed...

C-bug
I-suggestion-causes-error

This adds a `box-default` lint to suggest using `Box::default()` instead of `Box::new(Default::default())`, which offers less moving parts and potentially better performance according to [the perf book](https://nnethercote.github.io/perf-book/standard-library-types.html#box). --- changelog: add [`box_default`]...

S-waiting-on-review

changelog: none The old code cloned and sorted `usable_lints` into `sorted_usable_lints`, but then failed to do anything with `sorted_usable_lints`. This was discovered by my new `collection_is_never_read` lint (#9267) that I'm...

S-waiting-on-review