]> git.proxmox.com Git - rustc.git/blob - src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.nll.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / self / arbitrary_self_types_pin_lifetime_impl_trait.nll.stderr
1 error: lifetime may not live long enough
2 --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait.rs:6:31
3 |
4 LL | fn f(self: Pin<&Self>) -> impl Clone { self }
5 | - ^^^^^^^^^^ opaque type requires that `'1` must outlive `'static`
6 | |
7 | let's call the lifetime of this reference `'1`
8 |
9 help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound
10 |
11 LL | fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
12 | ++++
13
14 error: aborting due to previous error
15