rust/src/test/ui/lifetime_starts_expressions.rs

14 lines
279 B
Rust
Raw Normal View History

2018-04-23 04:18:04 -05:00
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();
}