rust/tests/source/loop.rs
Nick Cameron 81f2e449d7 Handle span error with continue
This should be properly addressed by #184, but requires a change to the rustc parser, so this patch just works around the issue.
2015-08-20 08:11:14 +12:00

29 lines
624 B
Rust

fn main() {
loop
{ return some_val;}
let x = loop { do_forever(); };
'label : loop {
// Just comments
}
'a: while loooooooooooooooooooooooooooooooooong_variable_name + another_value > some_other_value{}
while aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb {
}
'b: for xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx in some_iter(arg1, arg2) {
// do smth
}
while let Some(i) = x.find('s')
{
x.update();
// FIXME #184
// continue;
// continue 'foo;
}
}