Skip to content

Commit 6870638

Browse files
committed
Fix an endless loop in the tests.
1 parent 3505828 commit 6870638

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/ui/implicit_return.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ fn test_loop_with_block() -> bool {
5555
fn test_loop_with_nests() -> bool {
5656
loop {
5757
if true {
58-
let _ = true;
58+
break true;
5959
}
6060
else {
61-
break true;
61+
let _ = true;
6262
}
6363
}
6464
}

tests/ui/implicit_return.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ error: missing return statement
4343
| ^^^^^^^^^^ help: change `break` to `return` as shown: `return true`
4444

4545
error: missing return statement
46-
--> $DIR/implicit_return.rs:61:13
46+
--> $DIR/implicit_return.rs:58:13
4747
|
48-
61 | break true;
48+
58 | break true;
4949
| ^^^^^^^^^^ help: change `break` to `return` as shown: `return true`
5050

5151
error: missing return statement

0 commit comments

Comments
 (0)