]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/issue-68643-broken-mir.rs
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / issue-68643-broken-mir.rs
1 // Regression test for #68643
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 `std::ops::Fn<()>` closure, found `T`
17 }
18
19 pub fn main() {
20 <fn()>::callme(|| {});
21 }