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

This PR closes https://github.com/rust-lang/rust-clippy/issues/11103. This is my first PR creating a new lint (and the second attempt of creating this PR, the first one I was not able to continue...

S-waiting-on-review

### Summary ```rust #![deny(clippy::borrow_interior_mutable_const)] use std::cell::UnsafeCell; const ATOMIC_TUPLE: (Vec, u8) = (Vec::new(), 42); fn main() { let _x = &ATOMIC_TUPLE.0; } ``` reports: ``` error: internal compiler error: /home/ben/rust/compiler/rustc_middle/src/ty/consts/valtree.rs:55:18: expected...

C-bug
I-ICE

### Summary This happens when we have a function that expects `Arc`. It generates a warning on the calls to the function (more specifically when the `Arc`s are constructed), but...

C-bug
I-false-positive

### What it does Lints cases where a `use`, item declaration, or local binding shadows an item in the Rust prelude. In the case of a `use`, it suggests instead...

A-lint

Short overview of the functional changes: * `possible_missing_comma`: * Actually check that the formatting looks like a unary op. * Also lint in tuples, parenthesis and argument lists. * Check...

S-waiting-on-review

### What it does Improve the code to be more concise ### Advantage - Less and cleaner ### Drawbacks _No response_ ### Example ```rust fn foo() { let x =...

A-lint

### What it does Constants can be shadowed when in different scopes. This can lead to non-obvious situations, where a later declared constant already shadows the previous constant, e.g. the...

A-lint

changelog: [`explicit_auto_deref`] Fix some false-positive cases Partially fix OP of #9841 Fix #12969

S-waiting-on-review

### Description cargo currently rebuilds all dependants of a crate instead of just relinking. when only changing the implementation of a lint, this is unnecessary. using dylib or cdylib should...

C-enhancement

The `assigning_clones` lint had a special case for producing a bit nicer code for mutable references: ```rust fn clone_function_lhs_mut_ref(mut_thing: &mut HasCloneFrom, ref_thing: &HasCloneFrom) { *mut_thing = Clone::clone(ref_thing); } //v fn...

S-waiting-on-author