rust/clippy_dev/src
Jason Newcomb fb9508d7a0
Fix new_lint clippy command (#14642)
I'm working on https://github.com/rust-lang/rust-clippy/issues/14542 and
I decided to name the lint `unnecessary_map` originally. However when I
ran the command, I got:

```
thread 'main' panicked at clippy_dev/src/new_lint.rs:450:5:
Lint `unnecessary_map` already defined in `/home/imperio/rust/clippy/clippy_lints/src/methods/mod.rs`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

It's because there is already a `unnecessary_map_or`, which matches the
`.contains()` call. This PR strengthens this check.

changelog: Fix `new_lint` clippy command

r? @flip1995
2025-05-02 15:47:40 +00:00
..
setup rename rust-toolchain to rust-toolchain.toml 2025-03-21 09:37:59 +09:00
dogfood.rs Merge commit '9f9a822509' into clippy-subtree-update 2025-02-28 23:27:09 +01:00
fmt.rs Merge commit '9f9a822509' into clippy-subtree-update 2025-02-28 23:27:09 +01:00
lib.rs Merge remote-tracking branch 'upstream/master' into rustup 2025-04-17 18:36:59 +02:00
lint.rs Merge commit '9f9a822509' into clippy-subtree-update 2025-02-28 23:27:09 +01:00
main.rs Move internal lints to their own crate 2025-04-12 17:53:36 -04:00
new_lint.rs Fix new_lint clippy command 2025-04-17 16:31:56 +02:00
release.rs Merge commit 'ff4a26d442' into clippy-subtree-update 2024-11-28 19:38:59 +01:00
serve.rs Merge commit 'f712eb5cdc' into clippy-subtree-update 2024-11-07 22:37:01 +01:00
sync.rs rename rust-toolchain to rust-toolchain.toml 2025-03-21 09:37:59 +09:00
update_lints.rs Move internal lints to their own crate (#13223) 2025-04-18 12:04:08 +00:00
utils.rs Apply collapsible_if to Clippy itself 2025-03-27 14:40:44 +01:00