rust/src/test/ui/type/type-error-break-tail.stderr

16 lines
518 B
Plaintext

error[E0308]: mismatched types
--> $DIR/type-error-break-tail.rs:3:20
|
LL | fn loop_ending() -> i32 {
| --- expected `i32` because of return type
LL | loop {
LL | if false { break; }
| ^^^^^
| |
| expected `i32`, found `()`
| help: give it a value of the expected type: `break 42`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.