summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-66702-break-outside-loop-val.rs
blob: 05b86cbbf8f057e90d267ece300f649ae42f8e1f (plain)
1
2
3
4
5
6
7
8
9
// Breaks with values inside closures used to ICE (#66863)

fn main() {
    'some_label: loop {
        || break 'some_label ();
        //~^ ERROR: use of unreachable label `'some_label`
        //~| ERROR: `break` inside of a closure
    }
}