]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-projection-in-where-clause.rs
Rollup merge of #76468 - SNCPlay42:lifetime-names, r=Mark-Simulacrum
[rust.git] / src / test / ui / associated-types / associated-types-projection-in-where-clause.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(unused_variables)]
4 // Test a where clause that uses a non-normalized projection type.
5
6 // pretty-expanded FIXME #23616
7
8 trait Int
9 {
10     type T;
11
12     fn dummy(&self) { }
13 }
14
15 trait NonZero
16 {
17     fn non_zero(self) -> bool;
18 }
19
20 fn foo<I:Int<T=J>,J>(t: I) -> bool
21     where <I as Int>::T : NonZero
22     //    ^~~~~~~~~~~~~ canonical form is just J
23 {
24     bar::<J>()
25 }
26
27 fn bar<NZ:NonZero>() -> bool { true }
28
29 fn main ()
30 {
31 }