]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs
Move some tests with compare-mode=nll output to revisions
[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
5 trait Fun {
6     type F<'a>: Fn() -> u32;
7
8     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
18 fn main() {
19     <&dyn Iterator<Item = u8>>::callme(&std::iter::once(1));
20 }