// check-pass #![allow(unused)] trait Bar { fn dummy(&self); } trait Foo { type A; type B: Bar; fn get_b(&self) -> &Self::B; } fn test_bar>(_: &B) {} fn test>(f: &F) { test_bar(f.get_b()); } trait Bar1 {} trait Caz1 { type A; type B: Bar1; } fn test1() where T: Caz1, U: Caz1 {} trait Bar2 {} trait Caz2 { type A; type B: Bar2; } fn test2>() {} fn main() {}