rust/src/test/ui/issues/issue-2216.rs
2019-07-27 18:56:16 +03:00

25 lines
428 B
Rust

// run-pass
#![allow(unreachable_code)]
pub fn main() {
let mut x = 0;
'foo: loop {
'bar: loop {
'quux: loop {
if 1 == 2 {
break 'foo;
}
else {
break 'bar;
}
}
continue 'foo;
}
x = 42;
break;
}
println!("{}", x);
assert_eq!(x, 42);
}