]> git.lizzy.rs Git - rust.git/blob - src/test/ui/for-loop-while/while-label.rs
Rollup merge of #102954 - GuillaumeGomez:cfg-hide-attr-checks, r=Manishearth
[rust.git] / src / test / ui / for-loop-while / while-label.rs
1 // run-pass
2 #![allow(unreachable_code)]
3
4
5 pub fn main() {
6     let mut i = 100;
7     'w: while 1 + 1 == 2 {
8         i -= 1;
9         if i == 95 {
10             break 'w;
11             panic!("Should have broken out of loop");
12         }
13     }
14     assert_eq!(i, 95);
15 }