about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-04 05:39:28 +0000
committerbors <bors@rust-lang.org>2024-07-04 05:39:28 +0000
commitd2400a49a43669025c37031791c1d200852ef160 (patch)
treea700856f1badef01daf5854a9d658de9b370e8d3 /compiler/rustc_codegen_gcc
parenta4bdab38f007d18b726d0bae3c15b01cae6f3cef (diff)
parent4e71fc4302898e28d7e4c570edf2f3d1feffe116 (diff)
downloadrust-d2400a49a43669025c37031791c1d200852ef160.tar.gz
rust-d2400a49a43669025c37031791c1d200852ef160.zip
Auto merge of #12873 - lochetti:issue_11103, r=llogiq
Add new lint `hashset_insert_after_contains`

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 because of personal reasons). Thanks for the patience :)

The idea of the lint is to find insert in hashmanps inside if staments that are checking if the hashmap contains the same value that is being inserted. This is not necessary since you could simply call the insert and check for the bool returned if you still need the if statement.

changelog: new lint: [hashset_insert_after_contains]
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions