1 // check-pass
2 
3 #![allow(unused)]
4 
5 trait Bar<T> {
dummy(&self)6     fn dummy(&self);
7 }
8 
9 trait Foo {
10     type A;
11     type B: Bar<Self::A>;
12 
get_b(&self) -> &Self::B13     fn get_b(&self) -> &Self::B;
14 }
15 
test_bar<A, B: Bar<A>>(_: &B)16 fn test_bar<A, B: Bar<A>>(_: &B) {}
17 
test<A, F: Foo<A = A>>(f: &F)18 fn test<A, F: Foo<A = A>>(f: &F) {
19     test_bar(f.get_b());
20 }
21 
22 trait Bar1<T> {}
23 trait Caz1 {
24     type A;
25     type B: Bar1<Self::A>;
26 }
27 
test1<T, U>() where T: Caz1, U: Caz1<A = T::A>28 fn test1<T, U>() where T: Caz1, U: Caz1<A = T::A> {}
29 
30 trait Bar2<T> {}
31 trait Caz2 {
32     type A;
33     type B: Bar2<Self::A>;
34 }
test2<T: Caz2<A = ()>>()35 fn test2<T: Caz2<A = ()>>() {}
36 
main()37 fn main() {}
38