blob: dcfc9ba511d740a7ec03c0e2a25080a81e69fb5d [file] [log] [blame]
error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_impl_trait.rs:8:31
|
LL | fn f(self: Pin<&Self>) -> impl Clone { self }
| - ^^^^^^^^^^ opaque type requires that `'1` must outlive `'static`
| |
| let's call the lifetime of this reference `'1`
help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a constraint
|
LL | fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
| ^^^^^^^^^^^^^^^
error: aborting due to previous error