add break return value syntax

This commit is contained in:
RouxAntoine 2021-04-28 20:35:30 +02:00
parent 4d0f48e755
commit cedaec6800
Signed by: antoine
GPG Key ID: 098FB66FC0475E70

View File

@ -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);
}