@@ -2,8 +2,11 @@ error: struct is never constructed: `Bar`
22 --> $DIR/lint-dead-code-1.rs:12:16
33 |
44LL | pub struct Bar;
5- | ^^^
5+ | ^^^ help: if this is intentional, prefix it with an underscore: `_Bar`
66 |
7+ = note: the leading underscore helps signal to the reader that the struct may still serve
8+ a purpose even if it isn't used in a way that we can detect (e.g. the struct
9+ is only used through FFI or used only for its effect when dropped)
710note: the lint level is defined here
811 --> $DIR/lint-dead-code-1.rs:5:9
912 |
@@ -14,55 +17,91 @@ error: static is never used: `priv_static`
1417 --> $DIR/lint-dead-code-1.rs:20:1
1518 |
1619LL | static priv_static: isize = 0;
17- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_priv_static`
21+ |
22+ = note: the leading underscore helps signal to the reader that the static may still serve
23+ a purpose even if it isn't used in a way that we can detect (e.g. the static
24+ is only used through FFI or used only for its effect when dropped)
1825
1926error: constant is never used: `priv_const`
2027 --> $DIR/lint-dead-code-1.rs:27:1
2128 |
2229LL | const priv_const: isize = 0;
23- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_priv_const`
31+ |
32+ = note: the leading underscore helps signal to the reader that the constant may still serve
33+ a purpose even if it isn't used in a way that we can detect (e.g. the constant
34+ is only used through FFI or used only for its effect when dropped)
2435
2536error: struct is never constructed: `PrivStruct`
2637 --> $DIR/lint-dead-code-1.rs:35:8
2738 |
2839LL | struct PrivStruct;
29- | ^^^^^^^^^^
40+ | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_PrivStruct`
41+ |
42+ = note: the leading underscore helps signal to the reader that the struct may still serve
43+ a purpose even if it isn't used in a way that we can detect (e.g. the struct
44+ is only used through FFI or used only for its effect when dropped)
3045
3146error: enum is never used: `priv_enum`
3247 --> $DIR/lint-dead-code-1.rs:64:6
3348 |
3449LL | enum priv_enum { foo2, bar2 }
35- | ^^^^^^^^^
50+ | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_priv_enum`
51+ |
52+ = note: the leading underscore helps signal to the reader that the enum may still serve
53+ a purpose even if it isn't used in a way that we can detect (e.g. the enum
54+ is only used through FFI or used only for its effect when dropped)
3655
3756error: variant is never constructed: `bar3`
3857 --> $DIR/lint-dead-code-1.rs:67:5
3958 |
4059LL | bar3
41- | ^^^^
60+ | ^^^^ help: if this is intentional, prefix it with an underscore: `_bar3`
61+ |
62+ = note: the leading underscore helps signal to the reader that the variant may still serve
63+ a purpose even if it isn't used in a way that we can detect (e.g. the variant
64+ is only used through FFI or used only for its effect when dropped)
4265
4366error: function is never used: `priv_fn`
4467 --> $DIR/lint-dead-code-1.rs:88:4
4568 |
4669LL | fn priv_fn() {
47- | ^^^^^^^
70+ | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_priv_fn`
71+ |
72+ = note: the leading underscore helps signal to the reader that the function may still serve
73+ a purpose even if it isn't used in a way that we can detect (e.g. the function
74+ is only used through FFI or used only for its effect when dropped)
4875
4976error: function is never used: `foo`
5077 --> $DIR/lint-dead-code-1.rs:93:4
5178 |
5279LL | fn foo() {
53- | ^^^
80+ | ^^^ help: if this is intentional, prefix it with an underscore: `_foo`
81+ |
82+ = note: the leading underscore helps signal to the reader that the function may still serve
83+ a purpose even if it isn't used in a way that we can detect (e.g. the function
84+ is only used through FFI or used only for its effect when dropped)
5485
5586error: function is never used: `bar`
5687 --> $DIR/lint-dead-code-1.rs:98:4
5788 |
5889LL | fn bar() {
59- | ^^^
90+ | ^^^ help: if this is intentional, prefix it with an underscore: `_bar`
91+ |
92+ = note: the leading underscore helps signal to the reader that the function may still serve
93+ a purpose even if it isn't used in a way that we can detect (e.g. the function
94+ is only used through FFI or used only for its effect when dropped)
6095
6196error: function is never used: `baz`
6297 --> $DIR/lint-dead-code-1.rs:102:4
6398 |
6499LL | fn baz() -> impl Copy {
65- | ^^^
100+ | ^^^ help: if this is intentional, prefix it with an underscore: `_baz`
101+ |
102+ = note: the leading underscore helps signal to the reader that the function may still serve
103+ a purpose even if it isn't used in a way that we can detect (e.g. the function
104+ is only used through FFI or used only for its effect when dropped)
66105
67106error: aborting due to 10 previous errors
68107
0 commit comments