]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[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 }