about summary refs log tree commit diff
path: root/tests/ui/issues/issue-5358-1.stderr
blob: f598cf33911f30703e3af25411b03a6f3c3b57e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 `S`, found `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)) {
LL +     match S(Either::Left(5)).0 {
   |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0308`.