Skip to content

Commit 06af25e

Browse files
committed
Bless tests.
1 parent 871993f commit 06af25e

9 files changed

+189
-92
lines changed

src/test/ui/closures/issue-87461.stderr

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ LL | Ok(())
55
| -- ^^ expected `u16`, found `()`
66
| |
77
| arguments to this enum variant are incorrect
8+
|
9+
note: tuple variant defined here
10+
--> $SRC_DIR/core/src/result.rs:LL:COL
11+
|
12+
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
13+
| ^^
814

915
error[E0308]: mismatched types
1016
--> $DIR/issue-87461.rs:17:8
@@ -13,6 +19,12 @@ LL | Ok(())
1319
| -- ^^ expected `u16`, found `()`
1420
| |
1521
| arguments to this enum variant are incorrect
22+
|
23+
note: tuple variant defined here
24+
--> $SRC_DIR/core/src/result.rs:LL:COL
25+
|
26+
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
27+
| ^^
1628

1729
error[E0308]: mismatched types
1830
--> $DIR/issue-87461.rs:26:12
@@ -21,6 +33,12 @@ LL | Ok(())
2133
| -- ^^ expected `u16`, found `()`
2234
| |
2335
| arguments to this enum variant are incorrect
36+
|
37+
note: tuple variant defined here
38+
--> $SRC_DIR/core/src/result.rs:LL:COL
39+
|
40+
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
41+
| ^^
2442

2543
error: aborting due to 3 previous errors
2644

src/test/ui/const-generics/const-argument-cross-crate-mismatch.stderr

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ LL | let _ = const_generic_lib::function(const_generic_lib::Struct([0u8, 1u8
55
| ------------------------- ^^^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements
66
| |
77
| arguments to this struct are incorrect
8+
|
9+
note: tuple struct defined here
10+
--> $DIR/auxiliary/const_generic_lib.rs:1:12
11+
|
12+
LL | pub struct Struct<const N: usize>(pub [u8; N]);
13+
| ^^^^^^
814

915
error[E0308]: mismatched types
1016
--> $DIR/const-argument-cross-crate-mismatch.rs:8:65
@@ -13,6 +19,12 @@ LL | let _: const_generic_lib::Alias = const_generic_lib::Struct([0u8, 1u8,
1319
| ------------------------- ^^^^^^^^^^^^^^^ expected an array with a fixed size of 2 elements, found one with 3 elements
1420
| |
1521
| arguments to this struct are incorrect
22+
|
23+
note: tuple struct defined here
24+
--> $DIR/auxiliary/const_generic_lib.rs:1:12
25+
|
26+
LL | pub struct Struct<const N: usize>(pub [u8; N]);
27+
| ^^^^^^
1628

1729
error: aborting due to 2 previous errors
1830

src/test/ui/mismatched_types/issue-35030.stderr

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ LL | Some(true)
1111
|
1212
= note: expected type parameter `bool` (type parameter `bool`)
1313
found type `bool` (`bool`)
14+
note: tuple variant defined here
15+
--> $SRC_DIR/core/src/option.rs:LL:COL
16+
|
17+
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
18+
| ^^^^
1419

1520
error: aborting due to previous error
1621

src/test/ui/pattern/pat-tuple-field-count-cross.stderr

Lines changed: 84 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -198,20 +198,19 @@ LL | pub struct S(pub u8, pub u8, pub u8);
198198
error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 3 fields
199199
--> $DIR/pat-tuple-field-count-cross.rs:24:9
200200
|
201-
LL | M() => {}
202-
| ^^^ expected 3 fields, found 0
201+
LL | M() => {}
202+
| ^^^ expected 3 fields, found 0
203203
|
204-
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
204+
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:12
205205
|
206-
LL | / pub struct M(
207-
LL | | pub u8,
208-
| | ------
209-
LL | | pub u8,
210-
| | ------
211-
LL | | pub u8,
212-
| | ------ tuple struct has 3 fields
213-
LL | | );
214-
| |__- tuple struct defined here
206+
LL | pub struct M(
207+
| - tuple struct defined here
208+
LL | pub u8,
209+
| ------
210+
LL | pub u8,
211+
| ------
212+
LL | pub u8,
213+
| ------ tuple struct has 3 fields
215214
|
216215
help: use `_` to explicitly ignore each field
217216
|
@@ -225,20 +224,19 @@ LL | M(..) => {}
225224
error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 3 fields
226225
--> $DIR/pat-tuple-field-count-cross.rs:25:11
227226
|
228-
LL | M(1) => {}
229-
| ^ expected 3 fields, found 1
227+
LL | M(1) => {}
228+
| ^ expected 3 fields, found 1
230229
|
231-
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
230+
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:12
232231
|
233-
LL | / pub struct M(
234-
LL | | pub u8,
235-
| | ------
236-
LL | | pub u8,
237-
| | ------
238-
LL | | pub u8,
239-
| | ------ tuple struct has 3 fields
240-
LL | | );
241-
| |__- tuple struct defined here
232+
LL | pub struct M(
233+
| - tuple struct defined here
234+
LL | pub u8,
235+
| ------
236+
LL | pub u8,
237+
| ------
238+
LL | pub u8,
239+
| ------ tuple struct has 3 fields
242240
|
243241
help: use `_` to explicitly ignore each field
244242
|
@@ -252,20 +250,19 @@ LL | M(1, ..) => {}
252250
error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 3 fields
253251
--> $DIR/pat-tuple-field-count-cross.rs:26:11
254252
|
255-
LL | M(xyz, abc) => {}
256-
| ^^^ ^^^ expected 3 fields, found 2
253+
LL | M(xyz, abc) => {}
254+
| ^^^ ^^^ expected 3 fields, found 2
257255
|
258-
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
256+
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:12
259257
|
260-
LL | / pub struct M(
261-
LL | | pub u8,
262-
| | ------
263-
LL | | pub u8,
264-
| | ------
265-
LL | | pub u8,
266-
| | ------ tuple struct has 3 fields
267-
LL | | );
268-
| |__- tuple struct defined here
258+
LL | pub struct M(
259+
| - tuple struct defined here
260+
LL | pub u8,
261+
| ------
262+
LL | pub u8,
263+
| ------
264+
LL | pub u8,
265+
| ------ tuple struct has 3 fields
269266
|
270267
help: use `_` to explicitly ignore each field
271268
|
@@ -275,20 +272,19 @@ LL | M(xyz, abc, _) => {}
275272
error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
276273
--> $DIR/pat-tuple-field-count-cross.rs:27:11
277274
|
278-
LL | M(1, 2, 3, 4) => {}
279-
| ^ ^ ^ ^ expected 3 fields, found 4
275+
LL | M(1, 2, 3, 4) => {}
276+
| ^ ^ ^ ^ expected 3 fields, found 4
280277
|
281-
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
278+
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:12
282279
|
283-
LL | / pub struct M(
284-
LL | | pub u8,
285-
| | ------
286-
LL | | pub u8,
287-
| | ------
288-
LL | | pub u8,
289-
| | ------ tuple struct has 3 fields
290-
LL | | );
291-
| |__- tuple struct defined here
280+
LL | pub struct M(
281+
| - tuple struct defined here
282+
LL | pub u8,
283+
| ------
284+
LL | pub u8,
285+
| ------
286+
LL | pub u8,
287+
| ------ tuple struct has 3 fields
292288

293289
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 0 fields
294290
--> $DIR/pat-tuple-field-count-cross.rs:36:16
@@ -438,20 +434,19 @@ LL | S(u8, u8, u8),
438434
error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 3 fields
439435
--> $DIR/pat-tuple-field-count-cross.rs:52:9
440436
|
441-
LL | E2::M() => {}
442-
| ^^^^^^^ expected 3 fields, found 0
437+
LL | E2::M() => {}
438+
| ^^^^^^^ expected 3 fields, found 0
443439
|
444440
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
445441
|
446-
LL | / M(
447-
LL | | u8,
448-
| | --
449-
LL | | u8,
450-
| | --
451-
LL | | u8,
452-
| | -- tuple variant has 3 fields
453-
LL | | ),
454-
| |_____- tuple variant defined here
442+
LL | M(
443+
| - tuple variant defined here
444+
LL | u8,
445+
| --
446+
LL | u8,
447+
| --
448+
LL | u8,
449+
| -- tuple variant has 3 fields
455450
|
456451
help: use `_` to explicitly ignore each field
457452
|
@@ -465,20 +460,19 @@ LL | E2::M(..) => {}
465460
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 3 fields
466461
--> $DIR/pat-tuple-field-count-cross.rs:53:15
467462
|
468-
LL | E2::M(1) => {}
469-
| ^ expected 3 fields, found 1
463+
LL | E2::M(1) => {}
464+
| ^ expected 3 fields, found 1
470465
|
471466
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
472467
|
473-
LL | / M(
474-
LL | | u8,
475-
| | --
476-
LL | | u8,
477-
| | --
478-
LL | | u8,
479-
| | -- tuple variant has 3 fields
480-
LL | | ),
481-
| |_____- tuple variant defined here
468+
LL | M(
469+
| - tuple variant defined here
470+
LL | u8,
471+
| --
472+
LL | u8,
473+
| --
474+
LL | u8,
475+
| -- tuple variant has 3 fields
482476
|
483477
help: use `_` to explicitly ignore each field
484478
|
@@ -492,20 +486,19 @@ LL | E2::M(1, ..) => {}
492486
error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 3 fields
493487
--> $DIR/pat-tuple-field-count-cross.rs:54:15
494488
|
495-
LL | E2::M(xyz, abc) => {}
496-
| ^^^ ^^^ expected 3 fields, found 2
489+
LL | E2::M(xyz, abc) => {}
490+
| ^^^ ^^^ expected 3 fields, found 2
497491
|
498492
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
499493
|
500-
LL | / M(
501-
LL | | u8,
502-
| | --
503-
LL | | u8,
504-
| | --
505-
LL | | u8,
506-
| | -- tuple variant has 3 fields
507-
LL | | ),
508-
| |_____- tuple variant defined here
494+
LL | M(
495+
| - tuple variant defined here
496+
LL | u8,
497+
| --
498+
LL | u8,
499+
| --
500+
LL | u8,
501+
| -- tuple variant has 3 fields
509502
|
510503
help: use `_` to explicitly ignore each field
511504
|
@@ -515,20 +508,19 @@ LL | E2::M(xyz, abc, _) => {}
515508
error[E0023]: this pattern has 4 fields, but the corresponding tuple variant has 3 fields
516509
--> $DIR/pat-tuple-field-count-cross.rs:55:15
517510
|
518-
LL | E2::M(1, 2, 3, 4) => {}
519-
| ^ ^ ^ ^ expected 3 fields, found 4
511+
LL | E2::M(1, 2, 3, 4) => {}
512+
| ^ ^ ^ ^ expected 3 fields, found 4
520513
|
521514
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
522515
|
523-
LL | / M(
524-
LL | | u8,
525-
| | --
526-
LL | | u8,
527-
| | --
528-
LL | | u8,
529-
| | -- tuple variant has 3 fields
530-
LL | | ),
531-
| |_____- tuple variant defined here
516+
LL | M(
517+
| - tuple variant defined here
518+
LL | u8,
519+
| --
520+
LL | u8,
521+
| --
522+
LL | u8,
523+
| -- tuple variant has 3 fields
532524

533525
error: aborting due to 28 previous errors
534526

src/test/ui/span/missing-unit-argument.stderr

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
44
LL | let _: Result<(), String> = Ok();
55
| ^^-- an argument of type `()` is missing
66
|
7+
note: tuple variant defined here
8+
--> $SRC_DIR/core/src/result.rs:LL:COL
9+
|
10+
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
11+
| ^^
712
help: provide the argument
813
|
914
LL | let _: Result<(), String> = Ok(());

src/test/ui/suggestions/args-instead-of-tuple-errors.stderr

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ LL | let _: Option<(i32, bool)> = Some(1, 2);
88
|
99
= note: expected tuple `(i32, bool)`
1010
found type `{integer}`
11+
note: tuple variant defined here
12+
--> $SRC_DIR/core/src/option.rs:LL:COL
13+
|
14+
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
15+
| ^^^^
1116
help: remove the extra argument
1217
|
1318
LL | let _: Option<(i32, bool)> = Some({(i32, bool)});
@@ -39,6 +44,11 @@ error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
3944
LL | let _: Option<(i8,)> = Some();
4045
| ^^^^-- an argument of type `(i8,)` is missing
4146
|
47+
note: tuple variant defined here
48+
--> $SRC_DIR/core/src/option.rs:LL:COL
49+
|
50+
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
51+
| ^^^^
4252
help: provide the argument
4353
|
4454
LL | let _: Option<(i8,)> = Some({(i8,)});
@@ -54,6 +64,11 @@ LL | let _: Option<(i32,)> = Some(5_usize);
5464
|
5565
= note: expected tuple `(i32,)`
5666
found type `usize`
67+
note: tuple variant defined here
68+
--> $SRC_DIR/core/src/option.rs:LL:COL
69+
|
70+
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
71+
| ^^^^
5772

5873
error[E0308]: mismatched types
5974
--> $DIR/args-instead-of-tuple-errors.rs:17:34
@@ -65,6 +80,11 @@ LL | let _: Option<(i32,)> = Some((5_usize));
6580
|
6681
= note: expected tuple `(i32,)`
6782
found type `usize`
83+
note: tuple variant defined here
84+
--> $SRC_DIR/core/src/option.rs:LL:COL
85+
|
86+
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
87+
| ^^^^
6888

6989
error: aborting due to 5 previous errors
7090

0 commit comments

Comments
 (0)