Skip to content

Commit 3e6dc2b

Browse files
committed
Forgot to update some test outputs
1 parent 40f434b commit 3e6dc2b

File tree

8 files changed

+46
-64
lines changed

8 files changed

+46
-64
lines changed

src/test/ui/rfc-2008-non-exhaustive/enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn main() {
2121
};
2222

2323
match enum_unit {};
24-
//~^ ERROR non-exhaustive patterns: multiple patterns of type `enums::NonExhaustiveEnum` are not handled [E0004]
24+
//~^ ERROR non-exhaustive patterns: `_` not covered [E0004]
2525

2626
// Everything below this is expected to compile successfully.
2727

src/test/ui/rfc-2008-non-exhaustive/enum.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ LL | match enum_unit {
1414
|
1515
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
1616

17-
error[E0004]: non-exhaustive patterns: multiple patterns of type `enums::NonExhaustiveEnum` are not handled
17+
error[E0004]: non-exhaustive patterns: `_` not covered
1818
--> $DIR/enum.rs:23:11
1919
|
2020
LL | match enum_unit {};
21-
| ^^^^^^^^^
21+
| ^^^^^^^^^ pattern `_` not covered
2222
|
2323
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2424

src/test/ui/rfc-2008-non-exhaustive/enum_same_crate_empty_match.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
#[non_exhaustive]
44
pub enum NonExhaustiveEnum {
55
Unit,
6-
//~^ variant not covered
6+
//~^ not covered
77
Tuple(u32),
8-
//~^ variant not covered
8+
//~^ not covered
99
Struct { field: u32 }
10-
//~^ variant not covered
10+
//~^ not covered
1111
}
1212

1313
pub enum NormalEnum {
1414
Unit,
15-
//~^ variant not covered
15+
//~^ not covered
1616
Tuple(u32),
17-
//~^ variant not covered
17+
//~^ not covered
1818
Struct { field: u32 }
19-
//~^ variant not covered
19+
//~^ not covered
2020
}
2121

2222
#[non_exhaustive]
@@ -25,13 +25,13 @@ pub enum EmptyNonExhaustiveEnum {}
2525
fn empty_non_exhaustive(x: EmptyNonExhaustiveEnum) {
2626
match x {}
2727
match x {
28-
_ => {} // FIXME: should be unreachable
28+
_ => {} // not detected as unreachable
2929
}
3030
}
3131

3232
fn main() {
3333
match NonExhaustiveEnum::Unit {}
34-
//~^ ERROR multiple patterns of type `NonExhaustiveEnum` are not handled [E0004]
34+
//~^ ERROR `Unit`, `Tuple(_)` and `Struct { .. }` not covered [E0004]
3535
match NormalEnum::Unit {}
36-
//~^ ERROR multiple patterns of type `NormalEnum` are not handled [E0004]
36+
//~^ ERROR `Unit`, `Tuple(_)` and `Struct { .. }` not covered [E0004]
3737
}

src/test/ui/rfc-2008-non-exhaustive/enum_same_crate_empty_match.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
error[E0004]: non-exhaustive patterns: multiple patterns of type `NonExhaustiveEnum` are not handled
1+
error[E0004]: non-exhaustive patterns: `Unit`, `Tuple(_)` and `Struct { .. }` not covered
22
--> $DIR/enum_same_crate_empty_match.rs:33:11
33
|
44
LL | / pub enum NonExhaustiveEnum {
55
LL | | Unit,
6-
| | ---- variant not covered
6+
| | ---- not covered
77
LL | |
88
LL | | Tuple(u32),
9-
| | ----- variant not covered
9+
| | ----- not covered
1010
LL | |
1111
LL | | Struct { field: u32 }
12-
| | ------ variant not covered
12+
| | ------ not covered
1313
LL | |
1414
LL | | }
1515
| |_- `NonExhaustiveEnum` defined here
1616
...
1717
LL | match NonExhaustiveEnum::Unit {}
18-
| ^^^^^^^^^^^^^^^^^^^^^^^
18+
| ^^^^^^^^^^^^^^^^^^^^^^^ patterns `Unit`, `Tuple(_)` and `Struct { .. }` not covered
1919
|
2020
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2121

22-
error[E0004]: non-exhaustive patterns: multiple patterns of type `NormalEnum` are not handled
22+
error[E0004]: non-exhaustive patterns: `Unit`, `Tuple(_)` and `Struct { .. }` not covered
2323
--> $DIR/enum_same_crate_empty_match.rs:35:11
2424
|
2525
LL | / pub enum NormalEnum {
2626
LL | | Unit,
27-
| | ---- variant not covered
27+
| | ---- not covered
2828
LL | |
2929
LL | | Tuple(u32),
30-
| | ----- variant not covered
30+
| | ----- not covered
3131
LL | |
3232
LL | | Struct { field: u32 }
33-
| | ------ variant not covered
33+
| | ------ not covered
3434
LL | |
3535
LL | | }
3636
| |_- `NormalEnum` defined here
3737
...
3838
LL | match NormalEnum::Unit {}
39-
| ^^^^^^^^^^^^^^^^
39+
| ^^^^^^^^^^^^^^^^ patterns `Unit`, `Tuple(_)` and `Struct { .. }` not covered
4040
|
4141
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
4242

src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedEnum` of type `uninhabited::IndirectUninhabitedEnum` is not handled
1+
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedEnum` is non-empty
22
--> $DIR/indirect_match.rs:18:11
33
|
44
LL | match x {}
55
| ^
66
|
77
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
88

9-
error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedStruct` of type `uninhabited::IndirectUninhabitedStruct` is not handled
9+
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedStruct` is non-empty
1010
--> $DIR/indirect_match.rs:22:11
1111
|
1212
LL | match x {}
1313
| ^
1414
|
1515
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
1616

17-
error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedTupleStruct` of type `uninhabited::IndirectUninhabitedTupleStruct` is not handled
17+
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedTupleStruct` is non-empty
1818
--> $DIR/indirect_match.rs:26:11
1919
|
2020
LL | match x {}
2121
| ^
2222
|
2323
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2424

25-
error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedVariants` of type `uninhabited::IndirectUninhabitedVariants` is not handled
25+
error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedVariants` is non-empty
2626
--> $DIR/indirect_match.rs:32:11
2727
|
2828
LL | match x {}

src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_same_crate.stderr

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,41 @@
1-
error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedEnum` of type `IndirectUninhabitedEnum` is not handled
1+
error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedEnum` is non-empty
22
--> $DIR/indirect_match_same_crate.rs:32:11
33
|
44
LL | pub struct IndirectUninhabitedEnum(UninhabitedEnum);
5-
| ----------------------------------------------------
6-
| | |
7-
| | variant not covered
8-
| `IndirectUninhabitedEnum` defined here
5+
| ---------------------------------------------------- `IndirectUninhabitedEnum` defined here
96
...
107
LL | match x {}
118
| ^
129
|
1310
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
1411

15-
error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedStruct` of type `IndirectUninhabitedStruct` is not handled
12+
error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedStruct` is non-empty
1613
--> $DIR/indirect_match_same_crate.rs:36:11
1714
|
1815
LL | pub struct IndirectUninhabitedStruct(UninhabitedStruct);
19-
| --------------------------------------------------------
20-
| | |
21-
| | variant not covered
22-
| `IndirectUninhabitedStruct` defined here
16+
| -------------------------------------------------------- `IndirectUninhabitedStruct` defined here
2317
...
2418
LL | match x {}
2519
| ^
2620
|
2721
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2822

29-
error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedTupleStruct` of type `IndirectUninhabitedTupleStruct` is not handled
23+
error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedTupleStruct` is non-empty
3024
--> $DIR/indirect_match_same_crate.rs:40:11
3125
|
3226
LL | pub struct IndirectUninhabitedTupleStruct(UninhabitedTupleStruct);
33-
| ------------------------------------------------------------------
34-
| | |
35-
| | variant not covered
36-
| `IndirectUninhabitedTupleStruct` defined here
27+
| ------------------------------------------------------------------ `IndirectUninhabitedTupleStruct` defined here
3728
...
3829
LL | match x {}
3930
| ^
4031
|
4132
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
4233

43-
error[E0004]: non-exhaustive patterns: pattern `IndirectUninhabitedVariants` of type `IndirectUninhabitedVariants` is not handled
34+
error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedVariants` is non-empty
4435
--> $DIR/indirect_match_same_crate.rs:46:11
4536
|
4637
LL | pub struct IndirectUninhabitedVariants(UninhabitedVariants);
47-
| ------------------------------------------------------------
48-
| | |
49-
| | variant not covered
50-
| `IndirectUninhabitedVariants` defined here
38+
| ------------------------------------------------------------ `IndirectUninhabitedVariants` defined here
5139
...
5240
LL | match x {}
5341
| ^

src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@ LL | match x {}
66
|
77
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
88

9-
error[E0004]: non-exhaustive patterns: pattern `UninhabitedStruct` of type `uninhabited::UninhabitedStruct` is not handled
9+
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedStruct` is non-empty
1010
--> $DIR/match.rs:22:11
1111
|
1212
LL | match x {}
1313
| ^
1414
|
1515
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
1616

17-
error[E0004]: non-exhaustive patterns: pattern `UninhabitedTupleStruct` of type `uninhabited::UninhabitedTupleStruct` is not handled
17+
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedTupleStruct` is non-empty
1818
--> $DIR/match.rs:26:11
1919
|
2020
LL | match x {}
2121
| ^
2222
|
2323
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2424

25-
error[E0004]: non-exhaustive patterns: multiple patterns of type `uninhabited::UninhabitedVariants` are not handled
25+
error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered
2626
--> $DIR/match.rs:30:11
2727
|
2828
LL | match x {}
29-
| ^
29+
| ^ patterns `Tuple(_)` and `Struct { .. }` not covered
3030
|
3131
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
3232

src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
error[E0004]: non-exhaustive patterns: pattern `UninhabitedStruct` of type `UninhabitedStruct` is not handled
1+
error[E0004]: non-exhaustive patterns: type `UninhabitedStruct` is non-empty
22
--> $DIR/match_same_crate.rs:28:11
33
|
4-
LL | pub struct UninhabitedStruct {
5-
| - ----------------- variant not covered
6-
| _|
7-
| |
4+
LL | / pub struct UninhabitedStruct {
85
LL | | _priv: !,
96
LL | | }
107
| |_- `UninhabitedStruct` defined here
@@ -14,33 +11,30 @@ LL | match x {}
1411
|
1512
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
1613

17-
error[E0004]: non-exhaustive patterns: pattern `UninhabitedTupleStruct` of type `UninhabitedTupleStruct` is not handled
14+
error[E0004]: non-exhaustive patterns: type `UninhabitedTupleStruct` is non-empty
1815
--> $DIR/match_same_crate.rs:32:11
1916
|
2017
LL | pub struct UninhabitedTupleStruct(!);
21-
| -------------------------------------
22-
| | |
23-
| | variant not covered
24-
| `UninhabitedTupleStruct` defined here
18+
| ------------------------------------- `UninhabitedTupleStruct` defined here
2519
...
2620
LL | match x {}
2721
| ^
2822
|
2923
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
3024

31-
error[E0004]: non-exhaustive patterns: multiple patterns of type `UninhabitedVariants` are not handled
25+
error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered
3226
--> $DIR/match_same_crate.rs:36:11
3327
|
3428
LL | / pub enum UninhabitedVariants {
3529
LL | | #[non_exhaustive] Tuple(!),
36-
| | ----- variant not covered
30+
| | ----- not covered
3731
LL | | #[non_exhaustive] Struct { x: ! }
38-
| | ------ variant not covered
32+
| | ------ not covered
3933
LL | | }
4034
| |_- `UninhabitedVariants` defined here
4135
...
4236
LL | match x {}
43-
| ^
37+
| ^ patterns `Tuple(_)` and `Struct { .. }` not covered
4438
|
4539
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
4640

0 commit comments

Comments
 (0)