Skip to content

Commit 19f4510

Browse files
committed
Bless tests
1 parent 08ceac8 commit 19f4510

File tree

3 files changed

+53
-17
lines changed

3 files changed

+53
-17
lines changed

src/test/ui/pattern/pat-tuple-overfield.stderr

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0530]: match bindings cannot shadow tuple structs
2-
--> $DIR/pat-tuple-overfield.rs:43:9
2+
--> $DIR/pat-tuple-overfield.rs:41:9
33
|
44
LL | struct Z1();
55
| ------------ the tuple struct `Z1` is defined here
@@ -8,7 +8,7 @@ LL | Z1 => {}
88
| ^^ cannot be named the same as a tuple struct
99

1010
error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
11-
--> $DIR/pat-tuple-overfield.rs:38:9
11+
--> $DIR/pat-tuple-overfield.rs:36:9
1212
|
1313
LL | struct Z0;
1414
| ---------- `Z0` defined here
@@ -28,7 +28,7 @@ LL | Z1() => {}
2828
| ~~
2929

3030
error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
31-
--> $DIR/pat-tuple-overfield.rs:39:9
31+
--> $DIR/pat-tuple-overfield.rs:37:9
3232
|
3333
LL | struct Z0;
3434
| ---------- `Z0` defined here
@@ -48,7 +48,7 @@ LL | Z1(_) => {}
4848
| ~~
4949

5050
error[E0532]: expected tuple struct or tuple variant, found unit struct `Z0`
51-
--> $DIR/pat-tuple-overfield.rs:40:9
51+
--> $DIR/pat-tuple-overfield.rs:38:9
5252
|
5353
LL | struct Z0;
5454
| ---------- `Z0` defined here
@@ -68,7 +68,7 @@ LL | Z1(_, _) => {}
6868
| ~~
6969

7070
error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
71-
--> $DIR/pat-tuple-overfield.rs:50:9
71+
--> $DIR/pat-tuple-overfield.rs:48:9
7272
|
7373
LL | Z0,
7474
| -- `E1::Z0` defined here
@@ -88,7 +88,7 @@ LL | E1::Z1() => {}
8888
| ~~
8989

9090
error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
91-
--> $DIR/pat-tuple-overfield.rs:51:9
91+
--> $DIR/pat-tuple-overfield.rs:49:9
9292
|
9393
LL | Z0,
9494
| -- `E1::Z0` defined here
@@ -108,7 +108,7 @@ LL | E1::Z1(_) => {}
108108
| ~~
109109

110110
error[E0532]: expected tuple struct or tuple variant, found unit variant `E1::Z0`
111-
--> $DIR/pat-tuple-overfield.rs:52:9
111+
--> $DIR/pat-tuple-overfield.rs:50:9
112112
|
113113
LL | Z0,
114114
| -- `E1::Z0` defined here
@@ -128,7 +128,7 @@ LL | E1::Z1(_, _) => {}
128128
| ~~
129129

130130
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E1::Z1`
131-
--> $DIR/pat-tuple-overfield.rs:55:9
131+
--> $DIR/pat-tuple-overfield.rs:53:9
132132
|
133133
LL | Z0,
134134
| -- similarly named unit variant `Z0` defined here
@@ -148,7 +148,7 @@ LL | E1::Z0 => {}
148148
| ~~
149149

150150
error[E0308]: mismatched types
151-
--> $DIR/pat-tuple-overfield.rs:21:9
151+
--> $DIR/pat-tuple-overfield.rs:19:9
152152
|
153153
LL | match (1, 2, 3) {
154154
| --------- this expression has type `({integer}, {integer}, {integer})`
@@ -159,7 +159,7 @@ LL | (1, 2, 3, 4) => {}
159159
found tuple `(_, _, _, _)`
160160

161161
error[E0308]: mismatched types
162-
--> $DIR/pat-tuple-overfield.rs:22:9
162+
--> $DIR/pat-tuple-overfield.rs:20:9
163163
|
164164
LL | match (1, 2, 3) {
165165
| --------- this expression has type `({integer}, {integer}, {integer})`
@@ -171,7 +171,7 @@ LL | (1, 2, .., 3, 4) => {}
171171
found tuple `(_, _, _, _)`
172172

173173
error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
174-
--> $DIR/pat-tuple-overfield.rs:26:11
174+
--> $DIR/pat-tuple-overfield.rs:24:11
175175
|
176176
LL | struct S(u8, u8, u8);
177177
| -- -- -- tuple struct has 3 fields
@@ -180,7 +180,7 @@ LL | S(1, 2, 3, 4) => {}
180180
| - ^ ^ ^ ^ expected 3 fields, found 4
181181

182182
error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
183-
--> $DIR/pat-tuple-overfield.rs:28:11
183+
--> $DIR/pat-tuple-overfield.rs:26:11
184184
|
185185
LL | struct S(u8, u8, u8);
186186
| -- -- -- tuple struct has 3 fields
@@ -189,7 +189,7 @@ LL | S(1, 2, .., 3, 4) => {}
189189
| - ^ ^ ^ ^ expected 3 fields, found 4
190190

191191
error[E0023]: this pattern has 6 fields, but the corresponding tuple struct has 5 fields
192-
--> $DIR/pat-tuple-overfield.rs:33:11
192+
--> $DIR/pat-tuple-overfield.rs:31:11
193193
|
194194
LL | struct M(
195195
| - tuple struct defined here
@@ -208,7 +208,7 @@ LL | M(1, 2, 3, 4, 5, 6) => {}
208208
| - ^ ^ ^ ^ ^ ^ expected 5 fields, found 6
209209

210210
error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 0 fields
211-
--> $DIR/pat-tuple-overfield.rs:45:12
211+
--> $DIR/pat-tuple-overfield.rs:43:12
212212
|
213213
LL | struct Z1();
214214
| --- tuple struct has 0 fields
@@ -217,7 +217,7 @@ LL | Z1(_) => {}
217217
| -- ^ expected 0 fields, found 1
218218

219219
error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 0 fields
220-
--> $DIR/pat-tuple-overfield.rs:46:12
220+
--> $DIR/pat-tuple-overfield.rs:44:12
221221
|
222222
LL | struct Z1();
223223
| --- tuple struct has 0 fields
@@ -226,7 +226,7 @@ LL | Z1(_, _) => {}
226226
| -- ^ ^ expected 0 fields, found 2
227227

228228
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 0 fields
229-
--> $DIR/pat-tuple-overfield.rs:57:16
229+
--> $DIR/pat-tuple-overfield.rs:55:16
230230
|
231231
LL | Z1(),
232232
| -- tuple variant has 0 fields
@@ -235,7 +235,7 @@ LL | E1::Z1(_) => {}
235235
| ------ ^ expected 0 fields, found 1
236236

237237
error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 0 fields
238-
--> $DIR/pat-tuple-overfield.rs:58:16
238+
--> $DIR/pat-tuple-overfield.rs:56:16
239239
|
240240
LL | Z1(),
241241
| -- tuple variant has 0 fields

src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ LL | <E>::V();
55
| ^^^^^^-- supplied 0 arguments
66
| |
77
| expected 1 argument
8+
|
9+
note: tuple variant defined here
10+
--> $DIR/enum-variant-priority-higher-than-other-inherent.rs:5:5
11+
|
12+
LL | V(u8)
13+
| ^
814

915
error[E0308]: mismatched types
1016
--> $DIR/enum-variant-priority-higher-than-other-inherent.rs:22:17

src/test/ui/typeck/struct-enum-wrong-args.stderr

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ LL | let _ = Wrapper();
2929
| ^^^^^^^-- supplied 0 arguments
3030
| |
3131
| expected 1 argument
32+
|
33+
note: tuple struct defined here
34+
--> $DIR/struct-enum-wrong-args.rs:2:8
35+
|
36+
LL | struct Wrapper(i32);
37+
| ^^^^^^^
3238

3339
error[E0061]: this struct takes 1 argument but 2 arguments were supplied
3440
--> $DIR/struct-enum-wrong-args.rs:10:13
@@ -37,6 +43,12 @@ LL | let _ = Wrapper(5, 2);
3743
| ^^^^^^^ - - supplied 2 arguments
3844
| |
3945
| expected 1 argument
46+
|
47+
note: tuple struct defined here
48+
--> $DIR/struct-enum-wrong-args.rs:2:8
49+
|
50+
LL | struct Wrapper(i32);
51+
| ^^^^^^^
4052

4153
error[E0061]: this struct takes 2 arguments but 0 arguments were supplied
4254
--> $DIR/struct-enum-wrong-args.rs:11:13
@@ -45,6 +57,12 @@ LL | let _ = DoubleWrapper();
4557
| ^^^^^^^^^^^^^-- supplied 0 arguments
4658
| |
4759
| expected 2 arguments
60+
|
61+
note: tuple struct defined here
62+
--> $DIR/struct-enum-wrong-args.rs:3:8
63+
|
64+
LL | struct DoubleWrapper(i32, i32);
65+
| ^^^^^^^^^^^^^
4866

4967
error[E0061]: this struct takes 2 arguments but 1 argument was supplied
5068
--> $DIR/struct-enum-wrong-args.rs:12:13
@@ -53,6 +71,12 @@ LL | let _ = DoubleWrapper(5);
5371
| ^^^^^^^^^^^^^ - supplied 1 argument
5472
| |
5573
| expected 2 arguments
74+
|
75+
note: tuple struct defined here
76+
--> $DIR/struct-enum-wrong-args.rs:3:8
77+
|
78+
LL | struct DoubleWrapper(i32, i32);
79+
| ^^^^^^^^^^^^^
5680

5781
error[E0061]: this struct takes 2 arguments but 3 arguments were supplied
5882
--> $DIR/struct-enum-wrong-args.rs:13:13
@@ -61,6 +85,12 @@ LL | let _ = DoubleWrapper(5, 2, 7);
6185
| ^^^^^^^^^^^^^ - - - supplied 3 arguments
6286
| |
6387
| expected 2 arguments
88+
|
89+
note: tuple struct defined here
90+
--> $DIR/struct-enum-wrong-args.rs:3:8
91+
|
92+
LL | struct DoubleWrapper(i32, i32);
93+
| ^^^^^^^^^^^^^
6494

6595
error: aborting due to 8 previous errors
6696

0 commit comments

Comments
 (0)