mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-09 15:13:57 +00:00
62ba3e70a1
The previous output was unintuitive to users.
14 lines
327 B
Rust
14 lines
327 B
Rust
enum Either<T, U> { Left(T), Right(U) }
|
|
struct S(Either<usize, usize>);
|
|
|
|
fn main() {
|
|
match S(Either::Left(5)) {
|
|
Either::Right(_) => {}
|
|
//~^ ERROR mismatched types
|
|
//~| expected `S`, found `Either<_, _>`
|
|
//~| expected struct `S`
|
|
//~| found enum `Either<_, _>`
|
|
_ => {}
|
|
}
|
|
}
|