rust/tests/ui/issues/issue-5358-1.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
327 B
Rust
Raw Normal View History

2013-12-26 05:55:05 +00:00
enum Either<T, U> { Left(T), Right(U) }
struct S(Either<usize, usize>);
fn main() {
match S(Either::Left(5)) {
2015-01-12 06:01:44 +00:00
Either::Right(_) => {}
//~^ ERROR mismatched types
//~| expected `S`, found `Either<_, _>`
//~| expected struct `S`
//~| found enum `Either<_, _>`
_ => {}
}
}