diff options
Diffstat (limited to 'tests/ui/expr/if/if-ret.stderr')
-rw-r--r-- | tests/ui/expr/if/if-ret.stderr | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/expr/if/if-ret.stderr b/tests/ui/expr/if/if-ret.stderr new file mode 100644 index 000000000..8ced271aa --- /dev/null +++ b/tests/ui/expr/if/if-ret.stderr @@ -0,0 +1,12 @@ +warning: unreachable block in `if` or `while` expression + --> $DIR/if-ret.rs:6:24 + | +LL | fn foo() { if (return) { } } + | -------- ^^^ unreachable block in `if` or `while` expression + | | + | any code following this expression is unreachable + | + = note: `#[warn(unreachable_code)]` on by default + +warning: 1 warning emitted + |