]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-error-break-tail.stderr
Rollup merge of #66044 - RalfJung:uninit-lint, r=oli-obk
[rust.git] / src / test / ui / type / type-error-break-tail.stderr
1 error[E0308]: mismatched types
2   --> $DIR/type-error-break-tail.rs:3:20
3    |
4 LL | fn loop_ending() -> i32 {
5    |                     --- expected `i32` because of return type
6 LL |     loop {
7 LL |         if false { break; }
8    |                    ^^^^^
9    |                    |
10    |                    expected i32, found ()
11    |                    help: give it a value of the expected type: `break 42`
12    |
13    = note: expected type `i32`
14               found type `()`
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0308`.