Fix an endless loop in the tests.

This commit is contained in:
daxpedda 2018-12-16 22:20:05 +01:00
parent 35058287ce
commit 6870638c3f
No known key found for this signature in database
GPG Key ID: C722DCB6A191EEAB
2 changed files with 4 additions and 4 deletions

View File

@ -55,10 +55,10 @@ fn test_loop_with_block() -> bool {
fn test_loop_with_nests() -> bool { fn test_loop_with_nests() -> bool {
loop { loop {
if true { if true {
let _ = true; break true;
} }
else { else {
break true; let _ = true;
} }
} }
} }

View File

@ -43,9 +43,9 @@ error: missing return statement
| ^^^^^^^^^^ help: change `break` to `return` as shown: `return true` | ^^^^^^^^^^ help: change `break` to `return` as shown: `return true`
error: missing return statement error: missing return statement
--> $DIR/implicit_return.rs:61:13 --> $DIR/implicit_return.rs:58:13
| |
61 | break true; 58 | break true;
| ^^^^^^^^^^ help: change `break` to `return` as shown: `return true` | ^^^^^^^^^^ help: change `break` to `return` as shown: `return true`
error: missing return statement error: missing return statement