add break return value syntax
This commit is contained in:
parent
4d0f48e755
commit
cedaec6800
@ -11,6 +11,11 @@ fn fair_dice_roll() -> i32 {
|
||||
|
||||
fn main() {
|
||||
|
||||
let x = 'named: loop {
|
||||
break 'named 10;
|
||||
};
|
||||
println!("{}", x);
|
||||
|
||||
let res = fair_dice_roll();
|
||||
println!("{}", res);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user