Skip to content

move multiple_bound_locations to style#16302

Merged
llogiq merged 1 commit into
rust-lang:masterfrom
cyrgani:lint-level
Jan 1, 2026
Merged

move multiple_bound_locations to style#16302
llogiq merged 1 commit into
rust-lang:masterfrom
cyrgani:lint-level

Conversation

@cyrgani

@cyrgani cyrgani commented Dec 26, 2025

Copy link
Copy Markdown
Contributor

This PR moves the multiple_bound_locations lint from suspicious to style. The suspicious category is described as "code that is most likely wrong or useless", which is not the case here at all, so style seems more fitting.
Fixes #15736, with some prior discussion at rust-lang/rust#146540.

changelog: move multiple_bound_locations lint to style group

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Dec 26, 2025
@rustbot

rustbot commented Dec 26, 2025

Copy link
Copy Markdown
Collaborator

r? @llogiq

rustbot has assigned @llogiq.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@llogiq

llogiq commented Jan 1, 2026

Copy link
Copy Markdown
Contributor

Thank you.

@llogiq llogiq added this pull request to the merge queue Jan 1, 2026
Merged via the queue into rust-lang:master with commit bacb819 Jan 1, 2026
11 of 13 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 1, 2026
@cyrgani cyrgani deleted the lint-level branch January 1, 2026 11:18
pull Bot pushed a commit to Mattlk13/rust-clippy that referenced this pull request May 21, 2026
The lint fires on `.get(...).is_some()` (or `.is_none()`) against
`HashSet`/`BTreeSet`/`HashMap`/`BTreeMap` and suggests `.contains()` /
`.contains_key()`. The two forms are semantically equivalent and the
suggestion is purely a readability/shortness refactor, so `complexity`
reads as a better fit than `suspicious` per the descriptions in the
clippy book:

- `suspicious` — "code that is most likely wrong or useless"
- `complexity` — "suggestions on how to simplify your code... in a
shorter and more readable way, while preserving the semantics"

rust-lang#16302 made the same kind of move for
`multiple_bound_locations` (`suspicious` -> `style`) with similar
reasoning, so there is precedent for adjusting a lint's category when it
no longer matches the original placement.

Happy to drop this if the team prefers to keep it in `suspicious`; the
issue reporter raised the case and the category boundary is a judgement
call.

Fixes rust-lang#16990.

changelog: move `unnecessary_get_then_check` lint to `complexity` group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

multiple_bound_locations lint should not be in suspicious category

3 participants