rust-clippy/clippy_lints
bors 2795a60189 Auto merge of #12693 - GuillaumeGomez:run-on-self-needless_pass_by_ref_mut, r=Manishearth
Emit the `needless_pass_by_ref_mut` lint on `self` arguments as well

Fixes https://github.com/rust-lang/rust-clippy/issues/12589.
Fixes https://github.com/rust-lang/rust-clippy/issues/9591.

The first commit fixes a bug I uncovered while working on this: sometimes, the mutable borrow "event" happens before the alias one, which makes some argument detected as not used mutably even if they are. The fix was simply to fill the map with the aliases afterwards.

The second commit removes the restriction to not run `self` argument for the `needless_pass_by_ref_mut` lint.

changelog: emit the `needless_pass_by_ref_mut` lint on `self` arguments as well

r? `@Manishearth`
2024-04-18 22:42:41 +00:00
..
src Auto merge of #12693 - GuillaumeGomez:run-on-self-needless_pass_by_ref_mut, r=Manishearth 2024-04-18 22:42:41 +00:00
Cargo.toml Merge commit '9d6f41691ed9dbfaec2a2df2661c42451f2fe0d3' into clippy-subtree-update 2024-03-21 22:20:40 +01:00
README.md clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy. 2020-03-10 01:05:54 +01:00

This crate contains Clippy lints. For the main crate, check GitHub.