#![feature(async_closure)] // edition:2021 fn foo(x: impl FnOnce() -> Box) {} // just to make sure async closures can still be suggested for boxing. fn bar(x: Box X>) {} fn main() { foo(async move || {}); //~ ERROR mismatched types bar(async move || {}); //~ ERROR mismatched types }