@@ -4,10 +4,8 @@ error: struct is never constructed: `Bar`
4
4
LL | pub struct Bar;
5
5
| ^^^ help: if this is intentional, prefix it with an underscore: `_Bar`
6
6
|
7
- = note: The leading underscore signals to the reader that while the struct may not be constructed
8
- by any Rust code, it still serves some other purpose that isn't detected by rustc.
9
- (e.g. some values are used for their effect when dropped or used in FFI code
10
- exclusively through raw pointers)
7
+ = note: the leading underscore signals that this struct serves some other purpose
8
+ even if it isn't used in a way that we can detect.
11
9
note: the lint level is defined here
12
10
--> $DIR/lint-dead-code-1.rs:5:9
13
11
|
@@ -20,98 +18,80 @@ error: static is never used: `priv_static`
20
18
LL | static priv_static: isize = 0;
21
19
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_priv_static`
22
20
|
23
- = note: The leading underscore signals to the reader that while the static may not be used
24
- by any Rust code, it still serves some other purpose that isn't detected by rustc.
25
- (e.g. some values are used for their effect when dropped or used in FFI code
26
- exclusively through raw pointers)
21
+ = note: the leading underscore signals that this static serves some other purpose
22
+ even if it isn't used in a way that we can detect.
27
23
28
24
error: constant is never used: `priv_const`
29
25
--> $DIR/lint-dead-code-1.rs:27:1
30
26
|
31
27
LL | const priv_const: isize = 0;
32
28
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_priv_const`
33
29
|
34
- = note: The leading underscore signals to the reader that while the constant may not be used
35
- by any Rust code, it still serves some other purpose that isn't detected by rustc.
36
- (e.g. some values are used for their effect when dropped or used in FFI code
37
- exclusively through raw pointers)
30
+ = note: the leading underscore signals that this constant serves some other purpose
31
+ even if it isn't used in a way that we can detect.
38
32
39
33
error: struct is never constructed: `PrivStruct`
40
34
--> $DIR/lint-dead-code-1.rs:35:8
41
35
|
42
36
LL | struct PrivStruct;
43
37
| ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_PrivStruct`
44
38
|
45
- = note: The leading underscore signals to the reader that while the struct may not be constructed
46
- by any Rust code, it still serves some other purpose that isn't detected by rustc.
47
- (e.g. some values are used for their effect when dropped or used in FFI code
48
- exclusively through raw pointers)
39
+ = note: the leading underscore signals that this struct serves some other purpose
40
+ even if it isn't used in a way that we can detect.
49
41
50
42
error: enum is never used: `priv_enum`
51
43
--> $DIR/lint-dead-code-1.rs:64:6
52
44
|
53
45
LL | enum priv_enum { foo2, bar2 }
54
46
| ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_priv_enum`
55
47
|
56
- = note: The leading underscore signals to the reader that while the enum may not be used
57
- by any Rust code, it still serves some other purpose that isn't detected by rustc.
58
- (e.g. some values are used for their effect when dropped or used in FFI code
59
- exclusively through raw pointers)
48
+ = note: the leading underscore signals that this enum serves some other purpose
49
+ even if it isn't used in a way that we can detect.
60
50
61
51
error: variant is never constructed: `bar3`
62
52
--> $DIR/lint-dead-code-1.rs:67:5
63
53
|
64
54
LL | bar3
65
55
| ^^^^ help: if this is intentional, prefix it with an underscore: `_bar3`
66
56
|
67
- = note: The leading underscore signals to the reader that while the variant may not be constructed
68
- by any Rust code, it still serves some other purpose that isn't detected by rustc.
69
- (e.g. some values are used for their effect when dropped or used in FFI code
70
- exclusively through raw pointers)
57
+ = note: the leading underscore signals that this variant serves some other purpose
58
+ even if it isn't used in a way that we can detect.
71
59
72
60
error: function is never used: `priv_fn`
73
61
--> $DIR/lint-dead-code-1.rs:88:4
74
62
|
75
63
LL | fn priv_fn() {
76
64
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_priv_fn`
77
65
|
78
- = note: The leading underscore signals to the reader that while the function may not be used
79
- by any Rust code, it still serves some other purpose that isn't detected by rustc.
80
- (e.g. some values are used for their effect when dropped or used in FFI code
81
- exclusively through raw pointers)
66
+ = note: the leading underscore signals that this function serves some other purpose
67
+ even if it isn't used in a way that we can detect.
82
68
83
69
error: function is never used: `foo`
84
70
--> $DIR/lint-dead-code-1.rs:93:4
85
71
|
86
72
LL | fn foo() {
87
73
| ^^^ help: if this is intentional, prefix it with an underscore: `_foo`
88
74
|
89
- = note: The leading underscore signals to the reader that while the function may not be used
90
- by any Rust code, it still serves some other purpose that isn't detected by rustc.
91
- (e.g. some values are used for their effect when dropped or used in FFI code
92
- exclusively through raw pointers)
75
+ = note: the leading underscore signals that this function serves some other purpose
76
+ even if it isn't used in a way that we can detect.
93
77
94
78
error: function is never used: `bar`
95
79
--> $DIR/lint-dead-code-1.rs:98:4
96
80
|
97
81
LL | fn bar() {
98
82
| ^^^ help: if this is intentional, prefix it with an underscore: `_bar`
99
83
|
100
- = note: The leading underscore signals to the reader that while the function may not be used
101
- by any Rust code, it still serves some other purpose that isn't detected by rustc.
102
- (e.g. some values are used for their effect when dropped or used in FFI code
103
- exclusively through raw pointers)
84
+ = note: the leading underscore signals that this function serves some other purpose
85
+ even if it isn't used in a way that we can detect.
104
86
105
87
error: function is never used: `baz`
106
88
--> $DIR/lint-dead-code-1.rs:102:4
107
89
|
108
90
LL | fn baz() -> impl Copy {
109
91
| ^^^ help: if this is intentional, prefix it with an underscore: `_baz`
110
92
|
111
- = note: The leading underscore signals to the reader that while the function may not be used
112
- by any Rust code, it still serves some other purpose that isn't detected by rustc.
113
- (e.g. some values are used for their effect when dropped or used in FFI code
114
- exclusively through raw pointers)
93
+ = note: the leading underscore signals that this function serves some other purpose
94
+ even if it isn't used in a way that we can detect.
115
95
116
96
error: aborting due to 10 previous errors
117
97
0 commit comments