]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs
Rollup merge of #82308 - estebank:issue-82290, r=lcnr
[rust.git] / src / test / ui / generic-associated-types / issue-68645-codegen-fulfillment.rs
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;
16     //~^ ERROR expected a `Fn<()>` closure, found `T`
17 }
18
19 fn main() {
20     <&dyn Iterator<Item = u8>>::callme(&std::iter::once(1));
21 }