]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | warning: unreachable statement |
0731742a | 2 | --> $DIR/never-assign-dead-code.rs:10:5 |
b7449926 | 3 | | |
e1599b0c XL |
4 | LL | let x: ! = panic!("aah"); |
5 | | ------------- any code following this expression is unreachable | |
532ac7d7 | 6 | LL | drop(x); |
e1599b0c | 7 | | ^^^^^^^^ unreachable statement |
b7449926 | 8 | | |
74b04a01 | 9 | note: the lint level is defined here |
e74abb32 | 10 | --> $DIR/never-assign-dead-code.rs:6:9 |
b7449926 XL |
11 | | |
12 | LL | #![warn(unused)] | |
13 | | ^^^^^^ | |
416331ca | 14 | = note: `#[warn(unreachable_code)]` implied by `#[warn(unused)]` |
b7449926 | 15 | |
e1599b0c | 16 | warning: unreachable call |
0731742a | 17 | --> $DIR/never-assign-dead-code.rs:10:5 |
b7449926 | 18 | | |
532ac7d7 | 19 | LL | drop(x); |
e1599b0c XL |
20 | | ^^^^ - any code following this expression is unreachable |
21 | | | | |
22 | | unreachable call | |
b7449926 XL |
23 | |
24 | warning: unused variable: `x` | |
0731742a | 25 | --> $DIR/never-assign-dead-code.rs:9:9 |
b7449926 | 26 | | |
532ac7d7 | 27 | LL | let x: ! = panic!("aah"); |
ba9703b0 | 28 | | ^ help: if this is intentional, prefix it with an underscore: `_x` |
b7449926 | 29 | | |
74b04a01 | 30 | note: the lint level is defined here |
e74abb32 | 31 | --> $DIR/never-assign-dead-code.rs:6:9 |
b7449926 XL |
32 | | |
33 | LL | #![warn(unused)] | |
34 | | ^^^^^^ | |
416331ca | 35 | = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]` |
b7449926 | 36 | |
ba9703b0 XL |
37 | warning: 3 warnings emitted |
38 |