blob: 713d4b759096ef547a5b97f0dab7d81aabbb70d3 [file] [log] [blame]
error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:48
|
LL | async fn f(self: Pin<&Self>) -> impl Clone { self }
| - ^^^^^^^^ returning this value requires that `'_` must outlive `'static`
| |
| lifetime `'_` defined here
|
help: to allow this `impl Trait` to capture borrowed data with lifetime `'_`, add `'_` as a constraint
|
LL | async fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
| ^^^^^^^^^^^^^^^
error: aborting due to previous error