]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-37576.rs
Auto merge of #57108 - Mark-Simulacrum:license-remove, r=pietroalbini
[rust.git] / src / test / ui / issues / issue-37576.rs
1 fn main() {
2     'test_1: while break 'test_1 {}
3     while break {}
4     //~^ ERROR `break` or `continue` with no label
5
6     'test_2: while let true = break 'test_2 {}
7     while let true = break {}
8     //~^ ERROR `break` or `continue` with no label
9
10     loop { 'test_3: while break 'test_3 {} }
11     loop { while break {} }
12     //~^ ERROR `break` or `continue` with no label
13
14     loop {
15         'test_4: while break 'test_4 {}
16         break;
17     }
18     loop {
19         while break {}
20         //~^ ERROR `break` or `continue` with no label
21         break;
22     }
23
24     'test_5: while continue 'test_5 {}
25     while continue {}
26     //~^ ERROR `break` or `continue` with no label
27
28     'test_6: while let true = continue 'test_6 {}
29     while let true = continue {}
30     //~^ ERROR `break` or `continue` with no label
31
32     loop { 'test_7: while continue 'test_7 {} }
33     loop { while continue {} }
34     //~^ ERROR `break` or `continue` with no label
35
36     loop {
37         'test_8: while continue 'test_8 {}
38         continue;
39     }
40     loop {
41         while continue {}
42         //~^ ERROR `break` or `continue` with no label
43         continue;
44     }
45 }