summaryrefslogtreecommitdiffstats
path: root/tests/ui/label/label_break_value_desugared_break.rs
blob: 70227d869337df668670bfd8c7fb83e3630c62cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// compile-flags: --edition 2018
#![feature(try_blocks)]

// run-pass
fn main() {
    let _: Result<(), ()> = try {
        'foo: {
            Err(())?;
            break 'foo;
        }
    };

    'foo: {
        let _: Result<(), ()> = try {
            Err(())?;
            break 'foo;
        };
    }
}