1 // Regression test for #68645 2 3 #![feature(generic_associated_types)] 4 5 trait Fun { 6 type F<'a>: Fn() -> u32; 7 callme<'a>(f: Self::F<'a>) -> u328 fn callme<'a>(f: Self::F<'a>) -> u32 { 9 f() 10 } 11 } 12 13 impl<T> Fun for T { 14 type F<'a> = Self; 15 //~^ ERROR expected a `Fn<()>` closure, found `T` 16 } 17 main()18fn main() { 19 <&dyn Iterator<Item = u8>>::callme(&std::iter::once(1)); 20 } 21