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`. |