]> git.lizzy.rs Git - rust.git/blob - src/test/ui/break-while-condition.rs
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
[rust.git] / src / test / ui / break-while-condition.rs
1 #![feature(never_type)]
2
3 fn main() {
4     // The `if false` expressions are simply to
5     // make sure we don't avoid checking everything
6     // simply because a few expressions are unreachable.
7
8     if false {
9         let _: ! = { //~ ERROR mismatched types
10             'a: while break 'a {};
11         };
12     }
13
14     if false {
15         let _: ! = {
16             while false { //~ ERROR mismatched types
17                 break
18             }
19         };
20     }
21
22     if false {
23         let _: ! = {
24             while false { //~ ERROR mismatched types
25                 return
26             }
27         };
28     }
29 }