rust/tests/source/loop.rs

30 lines
699 B
Rust
Raw Normal View History

2015-07-13 19:51:56 +00:00
fn main() {
loop
{ return some_val;}
let x = loop { do_forever(); };
2015-07-16 14:29:28 +00:00
'label : loop {
2015-07-13 19:51:56 +00:00
// Just comments
}
2015-07-16 14:29:28 +00:00
'a: while loooooooooooooooooooooooooooooooooong_variable_name + another_value > some_other_value{}
while aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb {
}
2015-07-19 21:39:48 +00:00
2016-06-08 15:43:08 +00:00
while aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa {}
2015-07-19 21:39:48 +00:00
'b: for xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx in some_iter(arg1, arg2) {
// do smth
}
while let Some(i) = x.find('s')
{
x.update();
continue;
continue 'foo;
2015-07-19 21:39:48 +00:00
}
2015-07-13 19:51:56 +00:00
}