]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs
Merge commit '5ff7b632a95bac6955611d85040859128902c580' into sync-rustfmt-subtree
[rust.git] / src / test / ui / generic-associated-types / issue-68642-broken-llvm-ir.rs
1 // Regression test for #68642
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     <fn() -> usize>::callme(|| 1);
20 }