summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/issue-68643-broken-mir.rs
blob: 9af065b5d26d1003ea3244b8f3aeabd1c9062f41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Regression test for #68643

#![feature(generic_associated_types)]

trait Fun {
    type F<'a>: Fn() -> u32;

    fn callme<'a>(f: Self::F<'a>) -> u32 {
        f()
    }
}

impl<T> Fun for T {
    type F<'a> = Self;
    //~^ ERROR expected a `Fn<()>` closure, found `T`
}

pub fn main() {
    <fn()>::callme(|| {});
}