Skip to content

while_let_loop seems to not fire if the loop has a label #17590

Description

@Lokathor

Summary

the existence of a label on a loop prevents the warning from firing, which is silly because labels can also be legally applied to a while_let, so even a "comment" label could be preserved after the transformation

Lint Name

while_let_loop

Reproducer

https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=8c9d420ee6ddc8b5f55736e9d84aa3d4

Version

clippy 0.1.99 (c98d0cb27c 2026-08-12)

Metadata

Metadata

Labels

C-bugCategory: Clippy is not doing the correct thingI-false-negativeIssue: The lint should have been triggered on code, but wasn't

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions