error[E0308]: mismatched types --> $DIR/issue-57843.rs:23:9 | LL | Foo(Box::new(|_| ())); //~ ERROR mismatched types | ^^^^^^^^^^^^^^^^ one type is more general than the other | = note: expected type `std::ops::FnOnce<(&'a bool,)>` found type `std::ops::FnOnce<(&bool,)>` error: aborting due to previous error For more information about this error, try `rustc --explain E0308`.