From 4e8199b572f2035b7749cba276ece3a26630d23e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:21 +0200 Subject: Adding upstream version 1.67.1+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/match/issue-12552.stderr | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/test/ui/match/issue-12552.stderr (limited to 'src/test/ui/match/issue-12552.stderr') diff --git a/src/test/ui/match/issue-12552.stderr b/src/test/ui/match/issue-12552.stderr new file mode 100644 index 000000000..4b027eba2 --- /dev/null +++ b/src/test/ui/match/issue-12552.stderr @@ -0,0 +1,34 @@ +error[E0308]: mismatched types + --> $DIR/issue-12552.rs:6:5 + | +LL | match t { + | - this expression has type `Result<_, {integer}>` +LL | Some(k) => match k { + | ^^^^^^^ expected enum `Result`, found enum `Option` + | + = note: expected enum `Result<_, {integer}>` + found enum `Option<_>` +help: try wrapping the pattern in `Ok` + | +LL | Ok(Some(k)) => match k { + | +++ + + +error[E0308]: mismatched types + --> $DIR/issue-12552.rs:9:5 + | +LL | match t { + | - this expression has type `Result<_, {integer}>` +... +LL | None => () + | ^^^^ expected enum `Result`, found enum `Option` + | + = note: expected enum `Result<_, {integer}>` + found enum `Option<_>` +help: try wrapping the pattern in `Ok` + | +LL | Ok(None) => () + | +++ + + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. -- cgit v1.2.3