mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
40174e9481
Close #3217
25 lines
399 B
Rust
25 lines
399 B
Rust
#![feature(label_break_value)]
|
|
|
|
fn main() {
|
|
let mut res = 0;
|
|
's_39: {
|
|
if res == 0i32 {
|
|
println!("Hello, world!");
|
|
}
|
|
}
|
|
's_40: loop {
|
|
println!("res = {}", res);
|
|
res += 1;
|
|
if res == 3i32 {
|
|
break 's_40;
|
|
}
|
|
}
|
|
let toto = || {
|
|
if true {
|
|
42
|
|
} else {
|
|
24
|
|
}
|
|
};
|
|
}
|