error[E0308]: mismatched types --> $DIR/issue-40000.rs:16:9 | LL | foo(bar); //~ ERROR mismatched types | ^^^ expected concrete lifetime, found bound lifetime parameter | = note: expected type `std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r i32) + 'static)>` found type `std::boxed::Box` error: aborting due to previous error For more information about this error, try `rustc --explain E0308`.