blob: 2a4f5d57493e1887587278cd12c0f1f3e38adc9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#![allow(unused_labels)]
// Simple unlabeled break should yield in an error
fn unlabeled_break_simple() {
'b: {
break; //~ ERROR unlabeled `break` inside of a labeled block
}
}
// Unlabeled break that would cross a labeled block should yield in an error
fn unlabeled_break_crossing() {
loop {
'b: {
break; //~ ERROR unlabeled `break` inside of a labeled block
}
}
}
pub fn main() {}
|