summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2008-non-exhaustive
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /tests/ui/rfcs/rfc-2008-non-exhaustive
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/rfcs/rfc-2008-non-exhaustive')
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/enum.stderr5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum.stderr
index 872cb9b8b..4e7f3098a 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum.stderr
@@ -28,7 +28,8 @@ note: `NonExhaustiveEnum` defined here
|
LL | pub enum NonExhaustiveEnum {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
- = note: the matched value is of type `NonExhaustiveEnum`, which is marked as non-exhaustive
+ = note: the matched value is of type `NonExhaustiveEnum`
+ = note: `NonExhaustiveEnum` is marked as non-exhaustive, so a wildcard `_` is necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL ~ NonExhaustiveEnum::Struct { .. } => "third",
@@ -46,7 +47,7 @@ note: `NonExhaustiveEnum` defined here
|
LL | pub enum NonExhaustiveEnum {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
- = note: the matched value is of type `NonExhaustiveEnum`, which is marked as non-exhaustive
+ = note: the matched value is of type `NonExhaustiveEnum`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
LL ~ match enum_unit {