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".
9 lines
162 B
Rust
9 lines
162 B
Rust
// compile-flags: -D while-true
|
|
fn main() {
|
|
let mut i = 0;
|
|
while true { //~ ERROR denote infinite loops with loop
|
|
i += 1;
|
|
if i == 5 { break; }
|
|
}
|
|
}
|