error[E0311]: the parameter type `A` may not live long enough --> $DIR/type-param-missing-lifetime.rs:16:9 | LL | impl MyTy> { | -- the parameter type `A` must be valid for the anonymous lifetime as defined here... LL | async fn foo(self, arg: A, _: &str) -> &str { LL | check_bound(arg, self.0 .0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds | help: consider adding an explicit lifetime bound | LL ~ impl<'a, X> MyTy> { LL ~ async fn foo(self, arg: A, _: &str) -> &str { | error[E0311]: the parameter type `A` may not live long enough --> $DIR/type-param-missing-lifetime.rs:33:9 | LL | lt: Inv<'_>, | ------- the parameter type `A` must be valid for the anonymous lifetime defined here... ... LL | check_bound(arg, lt); | ^^^^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds | help: consider adding an explicit lifetime bound | LL ~ async fn foo2<'b>( LL | arg: A, LL ~ lt: Inv<'b>, LL | ) -> ( LL ~ impl Into<&'b str> + Into<&'b str> + 'b, LL ~ impl Into>> + 'b, LL ~ impl Into>>, LL ~ ) where A: 'b { | error[E0311]: the parameter type `A` may not live long enough --> $DIR/type-param-missing-lifetime.rs:40:9 | LL | async fn bar2<'b>(_dummy: &'a u8, arg: A, lt: Inv<'_>) { | ------- the parameter type `A` must be valid for the anonymous lifetime defined here... LL | check_bound(arg, lt); | ^^^^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds | help: consider adding an explicit lifetime bound | LL | async fn bar2<'c, 'b>(_dummy: &'a u8, arg: A, lt: Inv<'c>) where A: 'c { | +++ ~~ +++++++++++ error[E0311]: the parameter type `A` may not live long enough --> $DIR/type-param-missing-lifetime.rs:47:9 | LL | impl MyTy> { | -- the parameter type `A` must be valid for the anonymous lifetime as defined here... LL | async fn foo3(self) { LL | check_bound(self.0 .1, self.0 .0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds | help: consider adding an explicit lifetime bound | LL | impl<'a, A: 'a> MyTy> { | +++ ++++ ~~ error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0311`.