mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
Fix an endless loop in the tests.
This commit is contained in:
@@ -55,10 +55,10 @@ fn test_loop_with_block() -> bool {
|
||||
fn test_loop_with_nests() -> bool {
|
||||
loop {
|
||||
if true {
|
||||
let _ = true;
|
||||
break true;
|
||||
}
|
||||
else {
|
||||
break true;
|
||||
let _ = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ error: missing return statement
|
||||
| ^^^^^^^^^^ help: change `break` to `return` as shown: `return true`
|
||||
|
||||
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`
|
||||
|
||||
error: missing return statement
|
||||
|
||||
Reference in New Issue
Block a user