error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level --> $DIR/implicit-capture-late.rs:10:36 | LL | fn foo(x: Vec) -> Box Deref> { | ^^ error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0657`.