]> git.proxmox.com Git - rustc.git/blame - src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / self / arbitrary_self_types_pin_lifetime_impl_trait.stderr
CommitLineData
3c0e092e 1error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
ee023bcb 2 --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait.rs:6:44
f035d41b
XL
3 |
4LL | fn f(self: Pin<&Self>) -> impl Clone { self }
ee023bcb 5 | ----- ^^^^
3c0e092e
XL
6 | |
7 | hidden type `Pin<&Foo>` captures the anonymous lifetime defined here
8 |
a2a8927a 9help: to declare that the `impl Trait` captures `'_`, you can add an explicit `'_` lifetime bound
48663c56
XL
10 |
11LL | fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
94222f64 12 | ++++
48663c56
XL
13
14error: aborting due to previous error
15
3c0e092e 16For more information about this error, try `rustc --explain E0700`.