#![feature(async_closure)] //@ edition:2021 //@ run-rustfix fn foo(_: Box) {} fn bar(_: impl Fn() -> Box) {} fn main() { foo(Box::new(())); //~ ERROR mismatched types bar(|| Box::new(())); //~ ERROR mismatched types }