summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:36 +0000
commite02c5b5930c2c9ba3e5423fe12e2ef0155017297 (patch)
treefd60ebbbb5299e16e5fca8c773ddb74f764760db /tests/ui/pattern/usefulness/nested-non-exhaustive-enums.stderr
parentAdding debian version 1.73.0+dfsg1-1. (diff)
downloadrustc-e02c5b5930c2c9ba3e5423fe12e2ef0155017297.tar.xz
rustc-e02c5b5930c2c9ba3e5423fe12e2ef0155017297.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/pattern/usefulness/nested-non-exhaustive-enums.stderr')
-rw-r--r--tests/ui/pattern/usefulness/nested-non-exhaustive-enums.stderr22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.stderr b/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.stderr
new file mode 100644
index 000000000..9fbd871db
--- /dev/null
+++ b/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.stderr
@@ -0,0 +1,22 @@
+error[E0004]: non-exhaustive patterns: `Some(_)` not covered
+ --> $DIR/nested-non-exhaustive-enums.rs:8:11
+ |
+LL | match Some(NonExhaustiveEnum::A) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Some(_)` not covered
+ |
+note: `Option<NonExhaustiveEnum>` defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ ::: $SRC_DIR/core/src/option.rs:LL:COL
+ |
+ = note: not covered
+ = note: the matched value is of type `Option<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 ~ None => {},
+LL + Some(_) => todo!()
+ |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0004`.