2022-07-16 15:08:04 -05:00
|
|
|
fn main() {
|
2022-07-09 02:11:03 -05:00
|
|
|
let _ = fix(|_: &dyn Fn()| {});
|
2022-07-16 15:08:04 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn fix<F: Fn(G), G: Fn()>(f: F) -> impl Fn() {
|
2022-07-09 02:11:03 -05:00
|
|
|
move || f(fix(&f))
|
|
|
|
//~^ ERROR concrete type differs from previous defining opaque type use
|
2023-07-21 05:27:41 -05:00
|
|
|
//~| ERROR expected generic type parameter, found `&F`
|
2022-07-16 15:08:04 -05:00
|
|
|
}
|