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

### Summary `literal_string_with_formatting_args` does not support `lazy_format::lazy_format!`. ### Lint Name literal_string_with_formatting_args ### Reproducer ``` warning: this looks like a formatting argument but it is not part of a formatting macro...

C-bug
I-false-positive
L-nursery

Fixes: rust-lang/rust-clippy#14980 changelog: Fix suggestion-cases-error of [`empty_line_after_outer_attr`]

S-waiting-on-author

### Summary ``` warning: function call inside of `expect` --> src\ops\mod.rs:1353:39 | 1353 | fs::remove_dir_all(req_p).expect(if symlink { | _______________________________________^ 1354 | | "Failed to remove requested symlink" 1355 | |...

C-bug

### Summary I have 2 values to pass to a function. The first is borrowed (indirectly) from a field in the second, and the function needs a mutable reference of...

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

### Summary If a function argument is unused there is no way to know whether or not its signature is appropriate. It's better to not bother people with lints based...

C-enhancement
I-false-positive

### Summary `cloned_ref_to_slice_refs` lint may trigger when the `clone()` prevents borrow checker issues. ### Lint Name cloned_ref_to_slice_refs ### Reproducer I tried this code: ```rust use std::sync::RwLock; #[derive(Clone)] struct Foo; struct...

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

### Summary Minimal reproduction: ```rust pub fn one_borrow(data: &mut [u8]) { multiple_borrows( // warning: unnecessary use of `to_vec` // but if we remove `to_vec()`, we get // error[E0502]: cannot borrow...

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

### Summary When running `cargo clippy` it prints all warnings for all crates in the workspace. However when running it with `-Dwarnings`, it errors after the first crate that contains...

C-bug

e.g. `x == 10 && x == 0`, or checks that can be simplified, e.g. `x > 10 && x > 12` (which can be simplified to `x > 12`)....

E-medium
T-middle
A-lint

Fixes rust-lang/rust-clippy#14977 `unnecessary_debug_formatting` suggested display() regardless of MSRV. This adds MSRV check for OsStr and Path. changelog: [`unnecessary_debug_formatting`] respects MSRV

S-waiting-on-review