mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
One more test case.
This commit is contained in:
parent
05a5a1128f
commit
3b504610b6
@ -24,4 +24,8 @@ fn foo() -> i8 {
|
||||
loop {
|
||||
return 1;
|
||||
}
|
||||
|
||||
loop {
|
||||
1 //~ ERROR mismatched types
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,17 @@ help: you might have meant to return this value
|
||||
LL | return 1;
|
||||
| ^^^^^^ ^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/loop-no-implicit-break.rs:29:9
|
||||
|
|
||||
LL | 1
|
||||
| ^ expected `()`, found integer
|
||||
|
|
||||
help: you might have meant to return this value
|
||||
|
|
||||
LL | return 1;
|
||||
| ^^^^^^ ^
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
Loading…
Reference in New Issue
Block a user