summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type/type-error-break-tail.stderr
blob: 16dc6475c6f9ffea6a59d78979ff66f6c0d484f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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`.