]> git.lizzy.rs Git - rust.git/blob - tests/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / ui / self / arbitrary_self_types_pin_lifetime_impl_trait.stderr
1 error[E0700]: hidden type for `impl Clone` captures lifetime that does not appear in bounds
2   --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait.rs:6:44
3    |
4 LL |     fn f(self: Pin<&Self>) -> impl Clone { self }
5    |                    -----                   ^^^^
6    |                    |
7    |                    hidden type `Pin<&Foo>` captures the anonymous lifetime defined here
8    |
9 help: to declare that `impl Clone` captures `'_`, you can add an explicit `'_` lifetime bound
10    |
11 LL |     fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
12    |                                          ++++
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0700`.