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