]>
Commit | Line | Data |
---|---|---|
e1599b0c | 1 | error: lifetime may not live long enough |
136023e0 | 2 | --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:37 |
e1599b0c XL |
3 | | |
4 | LL | async fn f(self: Pin<&Self>) -> impl Clone { self } | |
136023e0 | 5 | | - ^^^^^^^^^^ opaque type requires that `'1` must outlive `'static` |
e1599b0c | 6 | | | |
60c5eb7d | 7 | | let's call the lifetime of this reference `'1` |
e74abb32 | 8 | | |
dfeec247 | 9 | help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound |
e1599b0c XL |
10 | | |
11 | LL | async fn f(self: Pin<&Self>) -> impl Clone + '_ { self } | |
94222f64 | 12 | | ++++ |
e1599b0c XL |
13 | |
14 | error: aborting due to previous error | |
15 |