2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(unreachable_code)]
|
2014-07-25 19:12:51 -05:00
|
|
|
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2014-07-25 19:12:51 -05:00
|
|
|
pub fn main() {
|
2015-01-25 15:05:03 -06:00
|
|
|
let mut i = 100;
|
|
|
|
'w: while 1 + 1 == 2 {
|
2014-07-25 19:12:51 -05:00
|
|
|
i -= 1;
|
|
|
|
if i == 95 {
|
|
|
|
break 'w;
|
2014-10-09 14:17:22 -05:00
|
|
|
panic!("Should have broken out of loop");
|
2014-07-25 19:12:51 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
assert_eq!(i, 95);
|
|
|
|
}
|