]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.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 }