summaryrefslogtreecommitdiffstats
path: root/tests/ui/loops/loop-labeled-break-value.rs
blob: 3488b057bc5d2e9ecb949b84e4426789555167a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
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
    }
}