1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
12 'test_1: while break 'test_1 {}
14 //~^ ERROR `break` or `continue` with no label
16 'test_2: while let true = break 'test_2 {}
17 while let true = break {}
18 //~^ ERROR `break` or `continue` with no label
20 loop { 'test_3: while break 'test_3 {} }
21 loop { while break {} }
22 //~^ ERROR `break` or `continue` with no label
25 'test_4: while break 'test_4 {}
30 //~^ ERROR `break` or `continue` with no label
34 'test_5: while continue 'test_5 {}
36 //~^ ERROR `break` or `continue` with no label
38 'test_6: while let true = continue 'test_6 {}
39 while let true = continue {}
40 //~^ ERROR `break` or `continue` with no label
42 loop { 'test_7: while continue 'test_7 {} }
43 loop { while continue {} }
44 //~^ ERROR `break` or `continue` with no label
47 'test_8: while continue 'test_8 {}
52 //~^ ERROR `break` or `continue` with no label