]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | warning: unreachable statement |
0731742a | 2 | --> $DIR/liveness-unused.rs:92:9 |
b7449926 | 3 | | |
e1599b0c XL |
4 | LL | continue; |
5 | | -------- any code following this expression is unreachable | |
532ac7d7 | 6 | LL | drop(*x as i32); |
e1599b0c | 7 | | ^^^^^^^^^^^^^^^^ unreachable statement |
b7449926 | 8 | | |
74b04a01 | 9 | note: the lint level is defined here |
0731742a | 10 | --> $DIR/liveness-unused.rs:1:9 |
b7449926 XL |
11 | | |
12 | LL | #![warn(unused)] | |
13 | | ^^^^^^ | |
416331ca | 14 | = note: `#[warn(unreachable_code)]` implied by `#[warn(unused)]` |
b7449926 XL |
15 | |
16 | error: unused variable: `x` | |
0731742a | 17 | --> $DIR/liveness-unused.rs:8:7 |
b7449926 XL |
18 | | |
19 | LL | fn f1(x: isize) { | |
ba9703b0 | 20 | | ^ help: if this is intentional, prefix it with an underscore: `_x` |
b7449926 | 21 | | |
74b04a01 | 22 | note: the lint level is defined here |
0731742a | 23 | --> $DIR/liveness-unused.rs:2:9 |
b7449926 XL |
24 | | |
25 | LL | #![deny(unused_variables)] | |
26 | | ^^^^^^^^^^^^^^^^ | |
27 | ||
28 | error: unused variable: `x` | |
0731742a | 29 | --> $DIR/liveness-unused.rs:12:8 |
b7449926 XL |
30 | | |
31 | LL | fn f1b(x: &mut isize) { | |
ba9703b0 | 32 | | ^ help: if this is intentional, prefix it with an underscore: `_x` |
b7449926 XL |
33 | |
34 | error: unused variable: `x` | |
0731742a | 35 | --> $DIR/liveness-unused.rs:20:9 |
b7449926 XL |
36 | | |
37 | LL | let x: isize; | |
ba9703b0 | 38 | | ^ help: if this is intentional, prefix it with an underscore: `_x` |
b7449926 XL |
39 | |
40 | error: unused variable: `x` | |
0731742a | 41 | --> $DIR/liveness-unused.rs:25:9 |
b7449926 XL |
42 | | |
43 | LL | let x = 3; | |
ba9703b0 | 44 | | ^ help: if this is intentional, prefix it with an underscore: `_x` |
b7449926 XL |
45 | |
46 | error: variable `x` is assigned to, but never used | |
6a06907d | 47 | --> $DIR/liveness-unused.rs:30:13 |
b7449926 XL |
48 | | |
49 | LL | let mut x = 3; | |
6a06907d | 50 | | ^ |
b7449926 XL |
51 | | |
52 | = note: consider using `_x` instead | |
53 | ||
54 | error: value assigned to `x` is never read | |
0731742a | 55 | --> $DIR/liveness-unused.rs:32:5 |
b7449926 XL |
56 | | |
57 | LL | x += 4; | |
58 | | ^ | |
59 | | | |
74b04a01 | 60 | note: the lint level is defined here |
0731742a | 61 | --> $DIR/liveness-unused.rs:3:9 |
b7449926 XL |
62 | | |
63 | LL | #![deny(unused_assignments)] | |
64 | | ^^^^^^^^^^^^^^^^^^ | |
0731742a | 65 | = help: maybe it is overwritten before being read? |
b7449926 XL |
66 | |
67 | error: variable `z` is assigned to, but never used | |
6a06907d | 68 | --> $DIR/liveness-unused.rs:37:13 |
b7449926 XL |
69 | | |
70 | LL | let mut z = 3; | |
6a06907d | 71 | | ^ |
b7449926 XL |
72 | | |
73 | = note: consider using `_z` instead | |
74 | ||
75 | error: unused variable: `i` | |
0731742a | 76 | --> $DIR/liveness-unused.rs:59:12 |
b7449926 XL |
77 | | |
78 | LL | Some(i) => { | |
ba9703b0 | 79 | | ^ help: if this is intentional, prefix it with an underscore: `_i` |
b7449926 XL |
80 | |
81 | error: unused variable: `x` | |
0731742a | 82 | --> $DIR/liveness-unused.rs:79:9 |
b7449926 XL |
83 | | |
84 | LL | for x in 1..10 { } | |
ba9703b0 | 85 | | ^ help: if this is intentional, prefix it with an underscore: `_x` |
b7449926 XL |
86 | |
87 | error: unused variable: `x` | |
0731742a | 88 | --> $DIR/liveness-unused.rs:84:10 |
b7449926 XL |
89 | | |
90 | LL | for (x, _) in [1, 2, 3].iter().enumerate() { } | |
ba9703b0 | 91 | | ^ help: if this is intentional, prefix it with an underscore: `_x` |
b7449926 XL |
92 | |
93 | error: unused variable: `x` | |
0731742a | 94 | --> $DIR/liveness-unused.rs:89:13 |
b7449926 XL |
95 | | |
96 | LL | for (_, x) in [1, 2, 3].iter().enumerate() { | |
ba9703b0 | 97 | | ^ help: if this is intentional, prefix it with an underscore: `_x` |
b7449926 XL |
98 | |
99 | error: variable `x` is assigned to, but never used | |
0731742a | 100 | --> $DIR/liveness-unused.rs:112:9 |
b7449926 XL |
101 | | |
102 | LL | let x; | |
103 | | ^ | |
104 | | | |
105 | = note: consider using `_x` instead | |
106 | ||
107 | error: value assigned to `x` is never read | |
0731742a | 108 | --> $DIR/liveness-unused.rs:116:9 |
b7449926 | 109 | | |
532ac7d7 | 110 | LL | x = 0; |
b7449926 | 111 | | ^ |
0731742a XL |
112 | | |
113 | = help: maybe it is overwritten before being read? | |
b7449926 | 114 | |
ba9703b0 | 115 | error: aborting due to 13 previous errors; 1 warning emitted |
b7449926 | 116 |