You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| help: if this is intentional, prefix it with an underscore: `_guard`
8
+
|
9
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
| help: if this is intentional, prefix it with an underscore: `_items`
8
+
|
9
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
Copy file name to clipboardexpand all lines: src/test/ui/lint/dead-code/lint-dead-code-4.stderr
+42-10
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,11 @@ error: field is never read: `b`
2
2
--> $DIR/lint-dead-code-4.rs:7:5
3
3
|
4
4
LL | b: bool,
5
-
| ^^^^^^^
5
+
| -^^^^^^
6
+
| |
7
+
| help: if this is intentional, prefix it with an underscore: `_b`
6
8
|
9
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
7
10
note: the lint level is defined here
8
11
--> $DIR/lint-dead-code-4.rs:3:9
9
12
|
@@ -14,59 +17,88 @@ error: variant is never constructed: `X`
14
17
--> $DIR/lint-dead-code-4.rs:15:5
15
18
|
16
19
LL | X,
17
-
| ^
20
+
| ^ help: if this is intentional, prefix it with an underscore: `_X`
21
+
|
22
+
= note: the leading underscore signals that this variant serves some other purpose even if it isn't used in a way that we can detect.
18
23
19
24
error: variant is never constructed: `Y`
20
25
--> $DIR/lint-dead-code-4.rs:16:5
21
26
|
22
-
LL | / Y {
27
+
LL | Y {
28
+
| ^ help: if this is intentional, prefix it with an underscore: `_Y`
29
+
| _____|
30
+
| |
23
31
LL | | a: String,
24
32
LL | | b: i32,
25
33
LL | | c: i32,
26
34
LL | | },
27
35
| |_____^
36
+
|
37
+
= note: the leading underscore signals that this variant serves some other purpose even if it isn't used in a way that we can detect.
28
38
29
39
error: enum is never used: `ABC`
30
40
--> $DIR/lint-dead-code-4.rs:24:6
31
41
|
32
42
LL | enum ABC {
33
-
| ^^^
43
+
| ^^^ help: if this is intentional, prefix it with an underscore: `_ABC`
44
+
|
45
+
= note: the leading underscore signals that this enum serves some other purpose even if it isn't used in a way that we can detect.
34
46
35
47
error: variant is never constructed: `I`
36
48
--> $DIR/lint-dead-code-4.rs:36:5
37
49
|
38
50
LL | I,
39
-
| ^
51
+
| ^ help: if this is intentional, prefix it with an underscore: `_I`
52
+
|
53
+
= note: the leading underscore signals that this variant serves some other purpose even if it isn't used in a way that we can detect.
40
54
41
55
error: field is never read: `b`
42
56
--> $DIR/lint-dead-code-4.rs:39:9
43
57
|
44
58
LL | b: i32,
45
-
| ^^^^^^
59
+
| -^^^^^
60
+
| |
61
+
| help: if this is intentional, prefix it with an underscore: `_b`
62
+
|
63
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
46
64
47
65
error: field is never read: `c`
48
66
--> $DIR/lint-dead-code-4.rs:40:9
49
67
|
50
68
LL | c: i32,
51
-
| ^^^^^^
69
+
| -^^^^^
70
+
| |
71
+
| help: if this is intentional, prefix it with an underscore: `_c`
72
+
|
73
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
52
74
53
75
error: variant is never constructed: `K`
54
76
--> $DIR/lint-dead-code-4.rs:42:5
55
77
|
56
78
LL | K
57
-
| ^
79
+
| ^ help: if this is intentional, prefix it with an underscore: `_K`
80
+
|
81
+
= note: the leading underscore signals that this variant serves some other purpose even if it isn't used in a way that we can detect.
58
82
59
83
error: field is never read: `x`
60
84
--> $DIR/lint-dead-code-4.rs:61:5
61
85
|
62
86
LL | x: usize,
63
-
| ^^^^^^^^
87
+
| -^^^^^^^
88
+
| |
89
+
| help: if this is intentional, prefix it with an underscore: `_x`
90
+
|
91
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
64
92
65
93
error: field is never read: `c`
66
94
--> $DIR/lint-dead-code-4.rs:63:5
67
95
|
68
96
LL | c: bool,
69
-
| ^^^^^^^
97
+
| -^^^^^^
98
+
| |
99
+
| help: if this is intentional, prefix it with an underscore: `_c`
100
+
|
101
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
Copy file name to clipboardexpand all lines: src/test/ui/lint/dead-code/write-only-field.stderr
+29-6
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,11 @@ error: field is never read: `f`
2
2
--> $DIR/write-only-field.rs:4:5
3
3
|
4
4
LL | f: i32,
5
-
| ^^^^^^
5
+
| -^^^^^
6
+
| |
7
+
| help: if this is intentional, prefix it with an underscore: `_f`
6
8
|
9
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
7
10
note: the lint level is defined here
8
11
--> $DIR/write-only-field.rs:1:9
9
12
|
@@ -14,31 +17,51 @@ error: field is never read: `sub`
14
17
--> $DIR/write-only-field.rs:5:5
15
18
|
16
19
LL | sub: Sub,
17
-
| ^^^^^^^^
20
+
| ---^^^^^
21
+
| |
22
+
| help: if this is intentional, prefix it with an underscore: `_sub`
23
+
|
24
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
18
25
19
26
error: field is never read: `f`
20
27
--> $DIR/write-only-field.rs:9:5
21
28
|
22
29
LL | f: i32,
23
-
| ^^^^^^
30
+
| -^^^^^
31
+
| |
32
+
| help: if this is intentional, prefix it with an underscore: `_f`
33
+
|
34
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
24
35
25
36
error: field is never read: `y`
26
37
--> $DIR/write-only-field.rs:28:9
27
38
|
28
39
LL | y: bool,
29
-
| ^^^^^^^
40
+
| -^^^^^^
41
+
| |
42
+
| help: if this is intentional, prefix it with an underscore: `_y`
43
+
|
44
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
30
45
31
46
error: field is never read: `u`
32
47
--> $DIR/write-only-field.rs:58:9
33
48
|
34
49
LL | u: u32,
35
-
| ^^^^^^
50
+
| -^^^^^
51
+
| |
52
+
| help: if this is intentional, prefix it with an underscore: `_u`
53
+
|
54
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
36
55
37
56
error: field is never read: `v`
38
57
--> $DIR/write-only-field.rs:59:9
39
58
|
40
59
LL | v: u32,
41
-
| ^^^^^^
60
+
| -^^^^^
61
+
| |
62
+
| help: if this is intentional, prefix it with an underscore: `_v`
63
+
|
64
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
Copy file name to clipboardexpand all lines: src/test/ui/union/union-fields-1.stderr
+19-4
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,11 @@ error: field is never read: `c`
2
2
--> $DIR/union-fields-1.rs:6:5
3
3
|
4
4
LL | c: u8,
5
-
| ^^^^^
5
+
| -^^^^
6
+
| |
7
+
| help: if this is intentional, prefix it with an underscore: `_c`
6
8
|
9
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
7
10
note: the lint level is defined here
8
11
--> $DIR/union-fields-1.rs:1:9
9
12
|
@@ -14,19 +17,31 @@ error: field is never read: `a`
14
17
--> $DIR/union-fields-1.rs:9:5
15
18
|
16
19
LL | a: u8,
17
-
| ^^^^^
20
+
| -^^^^
21
+
| |
22
+
| help: if this is intentional, prefix it with an underscore: `_a`
23
+
|
24
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
18
25
19
26
error: field is never read: `a`
20
27
--> $DIR/union-fields-1.rs:13:20
21
28
|
22
29
LL | union NoDropLike { a: u8 }
23
-
| ^^^^^
30
+
| -^^^^
31
+
| |
32
+
| help: if this is intentional, prefix it with an underscore: `_a`
33
+
|
34
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
24
35
25
36
error: field is never read: `c`
26
37
--> $DIR/union-fields-1.rs:18:5
27
38
|
28
39
LL | c: u8,
29
-
| ^^^^^
40
+
| -^^^^
41
+
| |
42
+
| help: if this is intentional, prefix it with an underscore: `_c`
43
+
|
44
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
Copy file name to clipboardexpand all lines: src/test/ui/union/union-lint-dead-code.stderr
+4-1
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,11 @@ error: field is never read: `b`
2
2
--> $DIR/union-lint-dead-code.rs:5:5
3
3
|
4
4
LL | b: bool,
5
-
| ^^^^^^^
5
+
| -^^^^^^
6
+
| |
7
+
| help: if this is intentional, prefix it with an underscore: `_b`
6
8
|
9
+
= note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code)
0 commit comments