]> git.proxmox.com Git - rustc.git/blame - src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / self / arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr
CommitLineData
e1599b0c 1error: lifetime may not live long enough
136023e0 2 --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:37
e1599b0c
XL
3 |
4LL | 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 9help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound
e1599b0c
XL
10 |
11LL | async fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
94222f64 12 | ++++
e1599b0c
XL
13
14error: aborting due to previous error
15