Skip to content

Conversation

@Erk-
Copy link
Contributor

@Erk- Erk- commented Dec 18, 2025

This adds a Clippy lint for the possible confusing behaviour pointed out in rust-lang/rust#150084 and rust-lang/rust#111514, and discussed in rust-lang/libs-team#304.

While no consensus have been reached in the API Change Proposal linked above I thought that it would still make sense to add a Clippy lint for the time being.

Open questions:

  • Which group should it be in?
  • Should it give warnings for AsciiChar, Ipv4Addr and Ipv6Addr? (Currently these will always panic when running over the max value)

changelog: new lint: [for_unbounded_range]

@rustbot rustbot added needs-fcp S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Dec 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 18, 2025

r? @dswij

rustbot has assigned @dswij.
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

@Erk- Erk- force-pushed the erk/new-lint/for-loops-over-unbounded-ranges branch from 3c36ce1 to cd100aa Compare December 18, 2025 10:14
@Erk- Erk- force-pushed the erk/new-lint/for-loops-over-unbounded-ranges branch from cd100aa to 9220570 Compare December 18, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-fcp S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants