Skip to content

Commit 0f05b27

Browse files
committed
[fixup] bless all the tests
1 parent d254a5f commit 0f05b27

35 files changed

+1203
-35
lines changed

tests/ui/async-await/return-type-notation/rtn-implied-in-supertrait.stderr

+15-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,19 @@ LL | #![feature(return_type_notation)]
77
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
88
= note: `#[warn(incomplete_features)]` on by default
99

10-
warning: 1 warning emitted
10+
warning: field `0` is never read
11+
--> $DIR/rtn-implied-in-supertrait.rs:9:22
12+
|
13+
LL | struct JoinHandle<T>(fn() -> T);
14+
| ---------- ^^^^^^^^^
15+
| |
16+
| field in this struct
17+
|
18+
= note: `#[warn(unused_tuple_struct_fields)]` on by default
19+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
20+
|
21+
LL | struct JoinHandle<T>(());
22+
| ~~
23+
24+
warning: 2 warnings emitted
1125

tests/ui/auto-traits/suspicious-impls-lint.stderr

+67-1
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,71 @@ note: try using the same sequence of generic parameters as the struct definition
7878
LL | pub struct WithLifetime<'a, T>(&'a (), T);
7979
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8080

81-
error: aborting due to 5 previous errors
81+
warning: field `0` is never read
82+
--> $DIR/suspicious-impls-lint.rs:13:33
83+
|
84+
LL | struct ContainsNonSendDirect<T>(*const T);
85+
| --------------------- ^^^^^^^^
86+
| |
87+
| field in this struct
88+
|
89+
= note: `#[warn(unused_tuple_struct_fields)]` on by default
90+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
91+
|
92+
LL | struct ContainsNonSendDirect<T>(());
93+
| ~~
94+
95+
warning: field `0` is never read
96+
--> $DIR/suspicious-impls-lint.rs:16:23
97+
|
98+
LL | struct ContainsPtr<T>(*const T);
99+
| ----------- ^^^^^^^^
100+
| |
101+
| field in this struct
102+
|
103+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
104+
|
105+
LL | struct ContainsPtr<T>(());
106+
| ~~
107+
108+
warning: field `0` is never read
109+
--> $DIR/suspicious-impls-lint.rs:17:35
110+
|
111+
LL | struct ContainsIndirectNonSend<T>(ContainsPtr<T>);
112+
| ----------------------- ^^^^^^^^^^^^^^
113+
| |
114+
| field in this struct
115+
|
116+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
117+
|
118+
LL | struct ContainsIndirectNonSend<T>(());
119+
| ~~
120+
121+
warning: field `0` is never read
122+
--> $DIR/suspicious-impls-lint.rs:20:23
123+
|
124+
LL | struct ContainsVec<T>(Vec<T>);
125+
| ----------- ^^^^^^
126+
| |
127+
| field in this struct
128+
|
129+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
130+
|
131+
LL | struct ContainsVec<T>(());
132+
| ~~
133+
134+
warning: field `0` is never read
135+
--> $DIR/suspicious-impls-lint.rs:44:32
136+
|
137+
LL | pub struct WithLifetime<'a, T>(&'a (), T);
138+
| ------------ ^^^^^^
139+
| |
140+
| field in this struct
141+
|
142+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
143+
|
144+
LL | pub struct WithLifetime<'a, T>((), T);
145+
| ~~
146+
147+
error: aborting due to 5 previous errors; 5 warnings emitted
82148

tests/ui/auto-traits/suspicious-negative-impls-lint.stderr

+28-1
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,32 @@ note: try using the same sequence of generic parameters as the struct definition
4848
LL | pub struct WithLifetime<'a, T>(&'a (), T);
4949
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5050

51-
error: aborting due to 3 previous errors
51+
warning: field `0` is never read
52+
--> $DIR/suspicious-negative-impls-lint.rs:6:23
53+
|
54+
LL | struct ContainsVec<T>(Vec<T>);
55+
| ----------- ^^^^^^
56+
| |
57+
| field in this struct
58+
|
59+
= note: `#[warn(unused_tuple_struct_fields)]` on by default
60+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
61+
|
62+
LL | struct ContainsVec<T>(());
63+
| ~~
64+
65+
warning: field `0` is never read
66+
--> $DIR/suspicious-negative-impls-lint.rs:16:32
67+
|
68+
LL | pub struct WithLifetime<'a, T>(&'a (), T);
69+
| ------------ ^^^^^^
70+
| |
71+
| field in this struct
72+
|
73+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
74+
|
75+
LL | pub struct WithLifetime<'a, T>((), T);
76+
| ~~
77+
78+
error: aborting due to 3 previous errors; 2 warnings emitted
5279

tests/ui/closures/2229_closure_analysis/migrations/auto_traits.fixed

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ fn test_sync_trait() {
5151
}
5252

5353
/* Test Clone Trait Migration */
54-
struct S(Foo);
54+
struct S(());
5555
struct T(i32);
5656

57-
struct U(S, T);
57+
struct U((), T);
5858

5959
impl Clone for U {
6060
fn clone(&self) -> Self {

tests/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr

+28-1
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,32 @@ LL ~ let c = || {
6363
LL + let _ = &f;
6464
|
6565

66-
error: aborting due to 3 previous errors
66+
warning: field `0` is never read
67+
--> $DIR/auto_traits.rs:54:10
68+
|
69+
LL | struct S(Foo);
70+
| - ^^^
71+
| |
72+
| field in this struct
73+
|
74+
= note: `#[warn(unused_tuple_struct_fields)]` on by default
75+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
76+
|
77+
LL | struct S(());
78+
| ~~
79+
80+
warning: field `0` is never read
81+
--> $DIR/auto_traits.rs:57:10
82+
|
83+
LL | struct U(S, T);
84+
| - ^
85+
| |
86+
| field in this struct
87+
|
88+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
89+
|
90+
LL | struct U((), T);
91+
| ~~
92+
93+
error: aborting due to 3 previous errors; 2 warnings emitted
6794

tests/ui/const-generics/issues/issue-85031-2.stderr

+15-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,19 @@ LL | Self::foo()
99
= help: a `loop` may express intention better if this is on purpose
1010
= note: `#[warn(unconditional_recursion)]` on by default
1111

12-
warning: 1 warning emitted
12+
warning: field `0` is never read
13+
--> $DIR/issue-85031-2.rs:9:20
14+
|
15+
LL | pub struct Ref<'a>(&'a i32);
16+
| --- ^^^^^^^
17+
| |
18+
| field in this struct
19+
|
20+
= note: `#[warn(unused_tuple_struct_fields)]` on by default
21+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
22+
|
23+
LL | pub struct Ref<'a>(());
24+
| ~~
25+
26+
warning: 2 warnings emitted
1327

tests/ui/consts/const-eval/issue-50814.stderr

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
warning: field `0` is never read
2+
--> $DIR/issue-50814.rs:7:11
3+
|
4+
LL | struct U8(u8);
5+
| -- ^^
6+
| |
7+
| field in this struct
8+
|
9+
= note: `#[warn(unused_tuple_struct_fields)]` on by default
10+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
11+
|
12+
LL | struct U8(());
13+
| ~~
14+
115
error[E0080]: evaluation of `<Sum<U8, U8> as Unsigned>::MAX` failed
216
--> $DIR/issue-50814.rs:15:21
317
|
@@ -16,6 +30,6 @@ note: the above error was encountered while instantiating `fn foo::<i32>`
1630
LL | foo(0);
1731
| ^^^^^^
1832

19-
error: aborting due to 1 previous error
33+
error: aborting due to 1 previous error; 1 warning emitted
2034

2135
For more information about this error, try `rustc --explain E0080`.

tests/ui/consts/const-eval/raw-bytes.64bit.stderr

+54-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
1+
warning: field `0` is never read
2+
--> $DIR/raw-bytes.rs:64:25
3+
|
4+
LL | struct RestrictedRange1(u32);
5+
| ---------------- ^^^
6+
| |
7+
| field in this struct
8+
|
9+
= note: `#[warn(unused_tuple_struct_fields)]` on by default
10+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
11+
|
12+
LL | struct RestrictedRange1(());
13+
| ~~
14+
15+
warning: field `0` is never read
16+
--> $DIR/raw-bytes.rs:70:25
17+
|
18+
LL | struct RestrictedRange2(u32);
19+
| ---------------- ^^^
20+
| |
21+
| field in this struct
22+
|
23+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
24+
|
25+
LL | struct RestrictedRange2(());
26+
| ~~
27+
28+
warning: field `0` is never read
29+
--> $DIR/raw-bytes.rs:131:14
30+
|
31+
LL | struct MyStr(str);
32+
| ----- ^^^
33+
| |
34+
| field in this struct
35+
|
36+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
37+
|
38+
LL | struct MyStr(());
39+
| ~~
40+
41+
warning: field `0` is never read
42+
--> $DIR/raw-bytes.rs:134:27
43+
|
44+
LL | struct MySlice<T: ?Sized>(bool, T);
45+
| ------- ^^^^
46+
| |
47+
| field in this struct
48+
|
49+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
50+
|
51+
LL | struct MySlice<T: ?Sized>((), T);
52+
| ~~
53+
154
error[E0080]: it is undefined behavior to use this value
255
--> $DIR/raw-bytes.rs:20:1
356
|
@@ -594,6 +647,6 @@ LL | pub static R6: &[bool] = unsafe {
594647
╾ALLOC_ID╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
595648
}
596649

597-
error: aborting due to 52 previous errors
650+
error: aborting due to 52 previous errors; 4 warnings emitted
598651

599652
For more information about this error, try `rustc --explain E0080`.

tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
warning: fields `0` and `1` are never read
2+
--> $DIR/ub-incorrect-vtable.rs:52:17
3+
|
4+
LL | struct Wide<'a>(&'a Foo, &'static VTable);
5+
| ---- ^^^^^^^ ^^^^^^^^^^^^^^^
6+
| |
7+
| fields in this struct
8+
|
9+
= note: `Wide` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
10+
= note: `#[warn(unused_tuple_struct_fields)]` on by default
11+
help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields
12+
|
13+
LL | struct Wide<'a>((), ());
14+
| ~~ ~~
15+
116
error[E0080]: it is undefined behavior to use this value
217
--> $DIR/ub-incorrect-vtable.rs:18:1
318
|
@@ -64,6 +79,6 @@ LL | const G: Wide = unsafe { Transmute { t: FOO }.u };
6479
╾ALLOC10╼ ╾ALLOC11╼ │ ╾──────╼╾──────╼
6580
}
6681

67-
error: aborting due to 6 previous errors
82+
error: aborting due to 6 previous errors; 1 warning emitted
6883

6984
For more information about this error, try `rustc --explain E0080`.

tests/ui/consts/const-eval/ub-nonnull.stderr

+28-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
warning: field `0` is never read
2+
--> $DIR/ub-nonnull.rs:42:25
3+
|
4+
LL | struct RestrictedRange1(u32);
5+
| ---------------- ^^^
6+
| |
7+
| field in this struct
8+
|
9+
= note: `#[warn(unused_tuple_struct_fields)]` on by default
10+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
11+
|
12+
LL | struct RestrictedRange1(());
13+
| ~~
14+
15+
warning: field `0` is never read
16+
--> $DIR/ub-nonnull.rs:48:25
17+
|
18+
LL | struct RestrictedRange2(u32);
19+
| ---------------- ^^^
20+
| |
21+
| field in this struct
22+
|
23+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
24+
|
25+
LL | struct RestrictedRange2(());
26+
| ~~
27+
128
error[E0080]: it is undefined behavior to use this value
229
--> $DIR/ub-nonnull.rs:14:1
330
|
@@ -76,6 +103,6 @@ LL | const NULL_FAT_PTR: NonNull<dyn Send> = unsafe {
76103
HEX_DUMP
77104
}
78105

79-
error: aborting due to 8 previous errors
106+
error: aborting due to 8 previous errors; 2 warnings emitted
80107

81108
For more information about this error, try `rustc --explain E0080`.

tests/ui/consts/const-eval/ub-wide-ptr.stderr

+28-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
warning: field `0` is never read
2+
--> $DIR/ub-wide-ptr.rs:28:14
3+
|
4+
LL | struct MyStr(str);
5+
| ----- ^^^
6+
| |
7+
| field in this struct
8+
|
9+
= note: `#[warn(unused_tuple_struct_fields)]` on by default
10+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
11+
|
12+
LL | struct MyStr(());
13+
| ~~
14+
15+
warning: field `0` is never read
16+
--> $DIR/ub-wide-ptr.rs:31:27
17+
|
18+
LL | struct MySlice<T: ?Sized>(bool, T);
19+
| ------- ^^^^
20+
| |
21+
| field in this struct
22+
|
23+
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
24+
|
25+
LL | struct MySlice<T: ?Sized>((), T);
26+
| ~~
27+
128
error[E0080]: it is undefined behavior to use this value
229
--> $DIR/ub-wide-ptr.rs:38:1
330
|
@@ -317,6 +344,6 @@ LL | static mut RAW_TRAIT_OBJ_VTABLE_INVALID_THROUGH_REF: *const dyn Trait = uns
317344
HEX_DUMP
318345
}
319346

320-
error: aborting due to 29 previous errors
347+
error: aborting due to 29 previous errors; 2 warnings emitted
321348

322349
For more information about this error, try `rustc --explain E0080`.

0 commit comments

Comments
 (0)