2024-08-06 13:06:29 -05:00
|
|
|
fn main() {
|
|
|
|
let _ = ['a'; { break 2; 1 }];
|
|
|
|
//~^ ERROR `break` outside of a loop or labeled block
|
|
|
|
//~| HELP consider labeling this block to be able to break within it
|
|
|
|
|
|
|
|
const {
|
|
|
|
{
|
|
|
|
//~^ HELP consider labeling this block to be able to break within it
|
|
|
|
break;
|
|
|
|
//~^ ERROR `break` outside of a loop or labeled block
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const {
|
|
|
|
break;
|
|
|
|
//~^ ERROR `break` outside of a loop or labeled block
|
|
|
|
};
|
2024-08-06 13:10:00 -05:00
|
|
|
|
|
|
|
{
|
|
|
|
const {
|
|
|
|
break;
|
|
|
|
//~^ ERROR `break` outside of a loop or labeled block
|
|
|
|
}
|
|
|
|
}
|
2024-08-06 13:06:29 -05:00
|
|
|
}
|