Skip to content

Commit 7faaf39

Browse files
committed
Updating test stderr files
1 parent 321aace commit 7faaf39

28 files changed

+342
-74
lines changed

src/test/ui/associated-consts/associated-const-dead-code.stderr

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ error: associated constant is never used: `BAR`
22
--> $DIR/associated-const-dead-code.rs:6:5
33
|
44
LL | const BAR: u32 = 1;
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 associated constant may still serve
8+
a purpose even if it isn't used in a way that we can detect (e.g. the associated constant
9+
is only used through FFI or used only for its effect when dropped)
710
note: the lint level is defined here
811
--> $DIR/associated-const-dead-code.rs:1:9
912
|

src/test/ui/derive-uninhabited-enum-38885.stderr

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ warning: variant is never constructed: `Void`
22
--> $DIR/derive-uninhabited-enum-38885.rs:13:5
33
|
44
LL | Void(Void),
5-
| ^^^^^^^^^^
5+
| ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Void`
66
|
7+
= note: the leading underscore helps signal to the reader that the variant may still serve
8+
a purpose even if it isn't used in a way that we can detect (e.g. the variant
9+
is only used through FFI or used only for its effect when dropped)
710
= note: `-W dead-code` implied by `-W unused`
811

912
warning: 1 warning emitted

src/test/ui/issues/issue-37515.stderr

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ warning: type alias is never used: `Z`
22
--> $DIR/issue-37515.rs:5:1
33
|
44
LL | type Z = dyn for<'x> Send;
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Z`
66
|
7+
= note: the leading underscore helps signal to the reader that the type alias may still serve
8+
a purpose even if it isn't used in a way that we can detect (e.g. the type alias
9+
is only used through FFI or used only for its effect when dropped)
710
note: the lint level is defined here
811
--> $DIR/issue-37515.rs:3:9
912
|

src/test/ui/lint/dead-code/basic.stderr

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ error: function is never used: `foo`
22
--> $DIR/basic.rs:4:4
33
|
44
LL | fn foo() {
5-
| ^^^
5+
| ^^^ help: if this is intentional, prefix it with an underscore: `_foo`
66
|
7+
= note: the leading underscore helps signal to the reader that the function may still serve
8+
a purpose even if it isn't used in a way that we can detect (e.g. the function
9+
is only used through FFI or used only for its effect when dropped)
710
note: the lint level is defined here
811
--> $DIR/basic.rs:1:9
912
|

src/test/ui/lint/dead-code/const-and-self.stderr

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ warning: variant is never constructed: `B`
22
--> $DIR/const-and-self.rs:33:5
33
|
44
LL | B,
5-
| ^
5+
| ^ help: if this is intentional, prefix it with an underscore: `_B`
66
|
7+
= note: the leading underscore helps signal to the reader that the variant may still serve
8+
a purpose even if it isn't used in a way that we can detect (e.g. the variant
9+
is only used through FFI or used only for its effect when dropped)
710
note: the lint level is defined here
811
--> $DIR/const-and-self.rs:3:9
912
|
@@ -14,7 +17,11 @@ warning: variant is never constructed: `C`
1417
--> $DIR/const-and-self.rs:34:5
1518
|
1619
LL | C,
17-
| ^
20+
| ^ help: if this is intentional, prefix it with an underscore: `_C`
21+
|
22+
= note: the leading underscore helps signal to the reader that the variant may still serve
23+
a purpose even if it isn't used in a way that we can detect (e.g. the variant
24+
is only used through FFI or used only for its effect when dropped)
1825

1926
warning: 2 warnings emitted
2027

src/test/ui/lint/dead-code/drop-only-field-issue-81658.stderr

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ error: field is never read: `guard`
22
--> $DIR/drop-only-field-issue-81658.rs:15:5
33
|
44
LL | guard: MutexGuard<'a, T>,
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_guard`
66
|
7+
= note: the leading underscore helps signal to the reader that the field may still serve
8+
a purpose even if it isn't used in a way that we can detect (e.g. the field
9+
is only used through FFI or used only for its effect when dropped)
710
note: the lint level is defined here
811
--> $DIR/drop-only-field-issue-81658.rs:8:9
912
|

src/test/ui/lint/dead-code/empty-unused-enum.stderr

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ error: enum is never used: `E`
22
--> $DIR/empty-unused-enum.rs:3:6
33
|
44
LL | enum E {}
5-
| ^
5+
| ^ help: if this is intentional, prefix it with an underscore: `_E`
66
|
7+
= note: the leading underscore helps signal to the reader that the enum may still serve
8+
a purpose even if it isn't used in a way that we can detect (e.g. the enum
9+
is only used through FFI or used only for its effect when dropped)
710
note: the lint level is defined here
811
--> $DIR/empty-unused-enum.rs:1:9
912
|

src/test/ui/lint/dead-code/field-used-in-ffi-issue-81658.stderr

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ error: field is never read: `items`
22
--> $DIR/field-used-in-ffi-issue-81658.rs:13:5
33
|
44
LL | items: Option<Vec<T>>,
5-
| ^^^^^^^^^^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_items`
66
|
7+
= note: the leading underscore helps signal to the reader that the field may still serve
8+
a purpose even if it isn't used in a way that we can detect (e.g. the field
9+
is only used through FFI or used only for its effect when dropped)
710
note: the lint level is defined here
811
--> $DIR/field-used-in-ffi-issue-81658.rs:7:9
912
|

src/test/ui/lint/dead-code/impl-trait.stderr

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ error: type alias is never used: `Unused`
22
--> $DIR/impl-trait.rs:12:1
33
|
44
LL | type Unused = ();
5-
| ^^^^^^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Unused`
66
|
7+
= note: the leading underscore helps signal to the reader that the type alias may still serve
8+
a purpose even if it isn't used in a way that we can detect (e.g. the type alias
9+
is only used through FFI or used only for its effect when dropped)
710
note: the lint level is defined here
811
--> $DIR/impl-trait.rs:1:9
912
|

src/test/ui/lint/dead-code/lint-dead-code-1.stderr

+49-10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ error: struct is never constructed: `Bar`
22
--> $DIR/lint-dead-code-1.rs:12:16
33
|
44
LL | 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)
710
note: 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
|
1619
LL | 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

1926
error: constant is never used: `priv_const`
2027
--> $DIR/lint-dead-code-1.rs:27:1
2128
|
2229
LL | 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

2536
error: struct is never constructed: `PrivStruct`
2637
--> $DIR/lint-dead-code-1.rs:35:8
2738
|
2839
LL | 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

3146
error: enum is never used: `priv_enum`
3247
--> $DIR/lint-dead-code-1.rs:64:6
3348
|
3449
LL | 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

3756
error: variant is never constructed: `bar3`
3857
--> $DIR/lint-dead-code-1.rs:67:5
3958
|
4059
LL | 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

4366
error: function is never used: `priv_fn`
4467
--> $DIR/lint-dead-code-1.rs:88:4
4568
|
4669
LL | 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

4976
error: function is never used: `foo`
5077
--> $DIR/lint-dead-code-1.rs:93:4
5178
|
5279
LL | 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

5586
error: function is never used: `bar`
5687
--> $DIR/lint-dead-code-1.rs:98:4
5788
|
5889
LL | 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

6196
error: function is never used: `baz`
6297
--> $DIR/lint-dead-code-1.rs:102:4
6398
|
6499
LL | 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

67106
error: aborting due to 10 previous errors
68107

src/test/ui/lint/dead-code/lint-dead-code-2.stderr

+14-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ error: function is never used: `dead_fn`
22
--> $DIR/lint-dead-code-2.rs:22:4
33
|
44
LL | fn dead_fn() {}
5-
| ^^^^^^^
5+
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dead_fn`
66
|
7+
= note: the leading underscore helps signal to the reader that the function may still serve
8+
a purpose even if it isn't used in a way that we can detect (e.g. the function
9+
is only used through FFI or used only for its effect when dropped)
710
note: the lint level is defined here
811
--> $DIR/lint-dead-code-2.rs:2:9
912
|
@@ -14,13 +17,21 @@ error: function is never used: `dead_fn2`
1417
--> $DIR/lint-dead-code-2.rs:25:4
1518
|
1619
LL | fn dead_fn2() {}
17-
| ^^^^^^^^
20+
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dead_fn2`
21+
|
22+
= note: the leading underscore helps signal to the reader that the function may still serve
23+
a purpose even if it isn't used in a way that we can detect (e.g. the function
24+
is only used through FFI or used only for its effect when dropped)
1825

1926
error: function is never used: `main`
2027
--> $DIR/lint-dead-code-2.rs:38:4
2128
|
2229
LL | fn main() {
23-
| ^^^^
30+
| ^^^^ help: if this is intentional, prefix it with an underscore: `_main`
31+
|
32+
= note: the leading underscore helps signal to the reader that the function may still serve
33+
a purpose even if it isn't used in a way that we can detect (e.g. the function
34+
is only used through FFI or used only for its effect when dropped)
2435

2536
error: aborting due to 3 previous errors
2637

src/test/ui/lint/dead-code/lint-dead-code-3.stderr

+24-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ error: struct is never constructed: `Foo`
22
--> $DIR/lint-dead-code-3.rs:14:8
33
|
44
LL | struct Foo;
5-
| ^^^
5+
| ^^^ help: if this is intentional, prefix it with an underscore: `_Foo`
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)
710
note: the lint level is defined here
811
--> $DIR/lint-dead-code-3.rs:4:9
912
|
@@ -14,25 +17,41 @@ error: associated function is never used: `foo`
1417
--> $DIR/lint-dead-code-3.rs:16:8
1518
|
1619
LL | fn foo(&self) {
17-
| ^^^
20+
| ^^^ help: if this is intentional, prefix it with an underscore: `_foo`
21+
|
22+
= note: the leading underscore helps signal to the reader that the associated function may still serve
23+
a purpose even if it isn't used in a way that we can detect (e.g. the associated function
24+
is only used through FFI or used only for its effect when dropped)
1825

1926
error: function is never used: `bar`
2027
--> $DIR/lint-dead-code-3.rs:21:4
2128
|
2229
LL | fn bar() {
23-
| ^^^
30+
| ^^^ help: if this is intentional, prefix it with an underscore: `_bar`
31+
|
32+
= note: the leading underscore helps signal to the reader that the function may still serve
33+
a purpose even if it isn't used in a way that we can detect (e.g. the function
34+
is only used through FFI or used only for its effect when dropped)
2435

2536
error: enum is never used: `c_void`
2637
--> $DIR/lint-dead-code-3.rs:60:6
2738
|
2839
LL | enum c_void {}
29-
| ^^^^^^
40+
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_c_void`
41+
|
42+
= note: the leading underscore helps signal to the reader that the enum may still serve
43+
a purpose even if it isn't used in a way that we can detect (e.g. the enum
44+
is only used through FFI or used only for its effect when dropped)
3045

3146
error: function is never used: `free`
3247
--> $DIR/lint-dead-code-3.rs:62:5
3348
|
3449
LL | fn free(p: *const c_void);
35-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
50+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_free`
51+
|
52+
= note: the leading underscore helps signal to the reader that the function may still serve
53+
a purpose even if it isn't used in a way that we can detect (e.g. the function
54+
is only used through FFI or used only for its effect when dropped)
3655

3756
error: aborting due to 5 previous errors
3857

0 commit comments

Comments
 (0)