rust/src/test/ui/lifetime_starts_expressions.rs
2018-12-25 21:08:33 -07:00

14 lines
279 B
Rust

fn foo() -> u32 {
return 'label: loop { break 'label 42; };
}
fn bar() -> u32 {
loop { break 'label: loop { break 'label 42; }; }
//~^ ERROR expected identifier, found keyword `loop`
//~| ERROR expected type, found keyword `loop`
}
pub fn main() {
foo();
}