about summary refs log tree commit diff
path: root/src/test/ui/closures/closure-array-break-length.rs
blob: f3567db1fac9c964697e394ba9646d369a238417 (plain)
1
2
3
4
5
6
7
8
9
fn main() {
    |_: [_; continue]| {}; //~ ERROR: `continue` outside of a loop

    while |_: [_; continue]| {} {} //~ ERROR: `continue` outside of a loop
    //~^ ERROR mismatched types

    while |_: [_; break]| {} {} //~ ERROR: `break` outside of a loop
    //~^ ERROR mismatched types
}