You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0309]: the parameter type `Self` may not live long enough
--> src/lib.rs:6:39
|
6 | async fn connect<'a>(&'a self) -> Self::Connection<'a>;
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding an explicit lifetime bound `Self: 'a`...
= note: ...so that the type `Self` will meet its required lifetime bounds...
note: ...that is required by this bound
--> src/lib.rs:5:44
|
5 | type Connection<'a>: Sized where Self: 'a;
| ^^
However, in the method context, Self: 'a is already implied by having a &'a self argument. The equivalent without async builds fine thanks to that, I think the async one should too.
playground
fails with
However, in the method context,
Self: 'a
is already implied by having a&'a self
argument. The equivalent withoutasync
builds fine thanks to that, I think theasync
one should too.@rustbot label F-async_fn_in_trait
The text was updated successfully, but these errors were encountered: