add never_loop tests

This commit is contained in:
Cameron Steffen 2017-10-05 23:46:08 -05:00
parent 73a1dd8e7f
commit a013568f70
1 changed files with 14 additions and 0 deletions

View File

@ -139,6 +139,19 @@ pub fn test13() {
}
}
pub fn test14() {
let mut a = true;
'outer: while a { // never loops
while a {
if a {
a = false;
continue
}
}
break 'outer;
}
}
fn main() {
test1();
test2();
@ -153,5 +166,6 @@ fn main() {
test11(|| 0);
test12(true, false);
test13();
test14();
}