]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0308]: mismatched types |
0731742a | 2 | --> $DIR/issue-5358-1.rs:6:9 |
8faf50e0 | 3 | | |
0731742a | 4 | LL | match S(Either::Left(5)) { |
dfeec247 | 5 | | ------------------ this expression has type `S` |
8faf50e0 | 6 | LL | Either::Right(_) => {} |
9ffffee4 | 7 | | ^^^^^^^^^^^^^^^^ expected `S`, found `Either<_, _>` |
8faf50e0 | 8 | | |
60c5eb7d XL |
9 | = note: expected struct `S` |
10 | found enum `Either<_, _>` | |
5e7ed085 FG |
11 | help: try wrapping the pattern in `S` |
12 | | | |
13 | LL | S(Either::Right(_)) => {} | |
14 | | ++ + | |
3c0e092e XL |
15 | help: you might have meant to use field `0` whose type is `Either<usize, usize>` |
16 | | | |
17 | LL | match S(Either::Left(5)).0 { | |
18 | | ~~~~~~~~~~~~~~~~~~~~ | |
8faf50e0 | 19 | |
4b012472 | 20 | error: aborting due to 1 previous error |
8faf50e0 XL |
21 | |
22 | For more information about this error, try `rustc --explain E0308`. |