diff options
Diffstat (limited to 'tests/ui/never_type/never-assign-dead-code.stderr')
-rw-r--r-- | tests/ui/never_type/never-assign-dead-code.stderr | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/ui/never_type/never-assign-dead-code.stderr b/tests/ui/never_type/never-assign-dead-code.stderr new file mode 100644 index 000000000..521b82023 --- /dev/null +++ b/tests/ui/never_type/never-assign-dead-code.stderr @@ -0,0 +1,33 @@ +warning: unreachable statement + --> $DIR/never-assign-dead-code.rs:10:5 + | +LL | let x: ! = panic!("aah"); + | ------------- any code following this expression is unreachable +LL | drop(x); + | ^^^^^^^^ unreachable statement + | +note: the lint level is defined here + --> $DIR/never-assign-dead-code.rs:6:9 + | +LL | #![warn(unused)] + | ^^^^^^ + = note: `#[warn(unreachable_code)]` implied by `#[warn(unused)]` + +warning: unreachable call + --> $DIR/never-assign-dead-code.rs:10:5 + | +LL | drop(x); + | ^^^^ - any code following this expression is unreachable + | | + | unreachable call + +warning: unused variable: `x` + --> $DIR/never-assign-dead-code.rs:9:9 + | +LL | let x: ! = panic!("aah"); + | ^ help: if this is intentional, prefix it with an underscore: `_x` + | + = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]` + +warning: 3 warnings emitted + |