diff options
Diffstat (limited to 'tests/ui/issues/issue-5358-1.stderr')
-rw-r--r-- | tests/ui/issues/issue-5358-1.stderr | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-5358-1.stderr b/tests/ui/issues/issue-5358-1.stderr new file mode 100644 index 000000000..9d5b8d9d3 --- /dev/null +++ b/tests/ui/issues/issue-5358-1.stderr @@ -0,0 +1,22 @@ +error[E0308]: mismatched types + --> $DIR/issue-5358-1.rs:6:9 + | +LL | match S(Either::Left(5)) { + | ------------------ this expression has type `S` +LL | Either::Right(_) => {} + | ^^^^^^^^^^^^^^^^ expected struct `S`, found enum `Either` + | + = note: expected struct `S` + found enum `Either<_, _>` +help: try wrapping the pattern in `S` + | +LL | S(Either::Right(_)) => {} + | ++ + +help: you might have meant to use field `0` whose type is `Either<usize, usize>` + | +LL | match S(Either::Left(5)).0 { + | ~~~~~~~~~~~~~~~~~~~~ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. |