Add a lint option to warn about while (true) { ... } #1962
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Milestone
Now that we have
loop{ ... }
, maybe there should be a warning or lint flag to suggest changingwhile(true) {...}
toloop{...}
. (This will be helpful to the user as they may be able to remove spuriousfail
s orunreachable
calls.)Since lint seems to just be concerned with ctypes right now, I'm not adding it yet since I'm not sure what the intent behind the current lint module is.
The text was updated successfully, but these errors were encountered: