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