rust/tests/ui/loops/loop-labeled-break-value.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
298 B
Rust
Raw Normal View History

fn main() {
loop {
let _: i32 = loop { break }; //~ ERROR mismatched types
}
loop {
let _: i32 = 'inner: loop { break 'inner }; //~ ERROR mismatched types
}
loop {
let _: i32 = 'inner2: loop { loop { break 'inner2 } }; //~ ERROR mismatched types
}
}