]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-5358-1.rs
Rollup merge of #96539 - tmandry:relnotes-1.61, r=Mark-Simulacrum
[rust.git] / src / test / ui / issues / issue-5358-1.rs
1 enum Either<T, U> { Left(T), Right(U) }
2 struct S(Either<usize, usize>);
3
4 fn main() {
5     match S(Either::Left(5)) {
6         Either::Right(_) => {}
7         //~^ ERROR mismatched types
8         //~| expected struct `S`, found enum `Either`
9         //~| expected struct `S`
10         //~| found enum `Either<_, _>`
11         _ => {}
12     }
13 }