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