diff options
Diffstat (limited to 'tests/ui/type/type-error-break-tail.stderr')
-rw-r--r-- | tests/ui/type/type-error-break-tail.stderr | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/type/type-error-break-tail.stderr b/tests/ui/type/type-error-break-tail.stderr new file mode 100644 index 000000000..16dc6475c --- /dev/null +++ b/tests/ui/type/type-error-break-tail.stderr @@ -0,0 +1,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`. |