dd66e7549b
This patch adds preliminary middle-end support (liveness and trans) for breaks and `loop`s to `loop` constructs that have labels. while and for loops can't have labels yet. Progress on #2216
22 lines
373 B
Rust
22 lines
373 B
Rust
fn main() {
|
|
let mut x = 0;
|
|
|
|
loop foo: {
|
|
loop bar: {
|
|
loop quux: {
|
|
if 1 == 2 {
|
|
break foo;
|
|
}
|
|
else {
|
|
break bar;
|
|
}
|
|
}
|
|
loop foo;
|
|
}
|
|
x = 42;
|
|
break;
|
|
}
|
|
|
|
error!("%?", x);
|
|
assert(x == 42);
|
|
} |