1
- warning: variable `a` is assigned to, but never used
2
- --> $DIR/liveness-consts.rs:7 :13
1
+ warning: unused variable: `e`
2
+ --> $DIR/liveness-consts.rs:24 :13
3
3
|
4
- LL | let mut a = 0 ;
5
- | ^
4
+ LL | let e = 1 ;
5
+ | ^ help: if this is intentional, prefix it with an underscore: `_e`
6
6
|
7
- = note: consider using `_a` instead
8
7
note: the lint level is defined here
9
8
--> $DIR/liveness-consts.rs:2:9
10
9
|
11
10
LL | #![warn(unused)]
12
11
| ^^^^^^
13
12
= note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
14
13
15
- warning: value assigned to `b` is never read
16
- --> $DIR/liveness-consts.rs:17:5
17
- |
18
- LL | b += 1;
19
- | ^
20
- |
21
- = help: maybe it is overwritten before being read?
22
- = note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]`
23
-
24
- warning: unused variable: `e`
25
- --> $DIR/liveness-consts.rs:24:13
26
- |
27
- LL | let e = 1;
28
- | ^ help: if this is intentional, prefix it with an underscore: `_e`
29
-
30
14
warning: unused variable: `s`
31
15
--> $DIR/liveness-consts.rs:33:24
32
16
|
@@ -39,6 +23,29 @@ warning: unused variable: `z`
39
23
LL | pub fn f(x: [u8; { let s = 17; 100 }]) -> [u8; { let z = 18; 100 }] {
40
24
| ^ help: if this is intentional, prefix it with an underscore: `_z`
41
25
26
+ warning: unused variable: `z`
27
+ --> $DIR/liveness-consts.rs:60:13
28
+ |
29
+ LL | let z = 42;
30
+ | ^ help: if this is intentional, prefix it with an underscore: `_z`
31
+
32
+ warning: variable `a` is assigned to, but never used
33
+ --> $DIR/liveness-consts.rs:7:13
34
+ |
35
+ LL | let mut a = 0;
36
+ | ^
37
+ |
38
+ = note: consider using `_a` instead
39
+
40
+ warning: value assigned to `b` is never read
41
+ --> $DIR/liveness-consts.rs:17:5
42
+ |
43
+ LL | b += 1;
44
+ | ^
45
+ |
46
+ = help: maybe it is overwritten before being read?
47
+ = note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]`
48
+
42
49
warning: value assigned to `t` is never read
43
50
--> $DIR/liveness-consts.rs:42:9
44
51
|
@@ -53,11 +60,5 @@ warning: unused variable: `w`
53
60
LL | let w = 10;
54
61
| ^ help: if this is intentional, prefix it with an underscore: `_w`
55
62
56
- warning: unused variable: `z`
57
- --> $DIR/liveness-consts.rs:60:13
58
- |
59
- LL | let z = 42;
60
- | ^ help: if this is intentional, prefix it with an underscore: `_z`
61
-
62
63
warning: 8 warnings emitted
63
64
0 commit comments