2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2015-03-22 13:13:15 -07:00
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2013-04-26 16:19:26 -07:00
|
|
|
'foo: loop {
|
2012-08-14 19:20:56 -07:00
|
|
|
loop {
|
2013-04-26 16:19:26 -07:00
|
|
|
break 'foo;
|
2012-08-14 19:20:56 -07:00
|
|
|
}
|
|
|
|
}
|
2013-09-08 22:08:01 +10:00
|
|
|
|
2015-01-25 22:05:03 +01:00
|
|
|
'bar: for _ in 0..100 {
|
2013-09-08 22:08:01 +10:00
|
|
|
loop {
|
|
|
|
break 'bar;
|
|
|
|
}
|
|
|
|
}
|
2014-07-25 20:12:51 -04:00
|
|
|
|
2015-01-25 22:05:03 +01:00
|
|
|
'foobar: while 1 + 1 == 2 {
|
2014-07-25 20:12:51 -04:00
|
|
|
loop {
|
|
|
|
break 'foobar;
|
|
|
|
}
|
|
|
|
}
|
2012-08-14 19:20:56 -07:00
|
|
|
}
|