]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-68643-broken-mir.rs
Auto merge of #106143 - matthiaskrgr:rollup-3kpy1dc, r=matthiaskrgr
[rust.git] / src / test / ui / generic-associated-types / issue-68643-broken-mir.rs
1 // Regression test for #68643
2
3 trait Fun {
4     type F<'a>: Fn() -> u32;
5
6     fn callme<'a>(f: Self::F<'a>) -> u32 {
7         f()
8     }
9 }
10
11 impl<T> Fun for T {
12     type F<'a> = Self;
13     //~^ ERROR expected a `Fn<()>` closure, found `T`
14 }
15
16 pub fn main() {
17     <fn()>::callme(|| {});
18 }