error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements --> $DIR/issue-75777.rs:11:14 | LL | Box::new(move |_| fut) | ^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime `'a` as defined here... --> $DIR/issue-75777.rs:9:11 | LL | fn inject<'a, Env: 'a, A: 'a + Send>(v: A) -> Box BoxFuture<'a, A>> { | ^^ note: ...so that the types are compatible --> $DIR/issue-75777.rs:11:14 | LL | Box::new(move |_| fut) | ^^^^^^^^^^^^ = note: expected `(Pin + Send>>,)` found `(Pin + Send + 'a)>>,)` = note: but, the lifetime must be valid for the static lifetime... note: ...so that the types are compatible --> $DIR/issue-75777.rs:11:5 | LL | Box::new(move |_| fut) | ^^^^^^^^^^^^^^^^^^^^^^ = note: expected `Box<(dyn FnOnce(&'a Env) -> Pin + Send + 'a)>> + 'static)>` found `Box Pin + Send + 'a)>>>` error: aborting due to previous error For more information about this error, try `rustc --explain E0495`.