ed56f86781
Deleted unused labels from compiler and fixed or allowed unused labels in tests. This patch removes some gratuitous unused labels and turns off the warning for unused labels that are a necessary part of tests. This will permit setting the `unused_labels` lint to `warn`.
25 lines
421 B
Rust
25 lines
421 B
Rust
// run-pass
|
|
#![allow(unreachable_code)]
|
|
pub fn main() {
|
|
let mut x = 0;
|
|
|
|
'foo: loop {
|
|
'bar: loop {
|
|
loop {
|
|
if 1 == 2 {
|
|
break 'foo;
|
|
}
|
|
else {
|
|
break 'bar;
|
|
}
|
|
}
|
|
continue 'foo;
|
|
}
|
|
x = 42;
|
|
break;
|
|
}
|
|
|
|
println!("{}", x);
|
|
assert_eq!(x, 42);
|
|
}
|