mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
41e8d152dc
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
22 lines
730 B
Text
22 lines
730 B
Text
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)).0 {
|
|
| ~~~~~~~~~~~~~~~~~~~~
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|