Nomenclature fixes in the lint checker. Fewer double-negatives.
New style is allow(foo), warn(foo), deny(foo) and forbid(foo),
mirrored by -A foo, -W foo, -D foo and -F foo on command line.
These replace -W no-foo, -W foo, -W err-foo, respectively.
Forbid is new, and means "deny, and you can't override it".
2012-07-27 00:08:21 +00:00
|
|
|
//@ compile-flags: -D while-true
|
2020-07-02 05:32:12 +00:00
|
|
|
//@ run-rustfix
|
|
|
|
|
2012-04-20 01:04:41 +00:00
|
|
|
fn main() {
|
2020-07-02 05:32:12 +00:00
|
|
|
let mut i = 0;
|
2021-01-19 23:51:51 +00:00
|
|
|
'a: while true { //~ ERROR denote infinite loops with `loop
|
2020-07-02 05:32:12 +00:00
|
|
|
i += 1;
|
2021-01-19 23:51:51 +00:00
|
|
|
if i == 5 { break 'a; }
|
2020-07-02 05:32:12 +00:00
|
|
|
}
|
2012-04-20 01:04:41 +00:00
|
|
|
}
|