]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/issue-72476-associated-type.rs
Rollup merge of #80298 - PankajChaudhary5:PankajChaudhary, r=GuillaumeGomez
[rust.git] / src / test / ui / pattern / usefulness / issue-72476-associated-type.rs
1 // check-pass
2
3 // From https://github.com/rust-lang/rust/issues/72476
4
5 trait A {
6     type Projection;
7 }
8
9 impl A for () {
10     type Projection = bool;
11 }
12
13 struct Next<T: A>(T::Projection);
14
15 fn f(item: Next<()>) {
16     match item {
17         Next(true) => {}
18         Next(false) => {}
19     }
20 }
21
22 fn main() {}