]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-68643-broken-mir.rs
Move some tests with compare-mode=nll output to revisions
[rust.git] / src / test / ui / generic-associated-types / issue-68643-broken-mir.rs
1 // Regression test for #68643
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 pub fn main() {
19     <fn()>::callme(|| {});
20 }