]>
Commit | Line | Data |
---|---|---|
3c0e092e | 1 | error[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 | | |
4 | LL | 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 | 9 | help: to declare that the `impl Trait` captures `'_`, you can add an explicit `'_` lifetime bound |
48663c56 XL |
10 | | |
11 | LL | fn f(self: Pin<&Self>) -> impl Clone + '_ { self } | |
94222f64 | 12 | | ++++ |
48663c56 XL |
13 | |
14 | error: aborting due to previous error | |
15 | ||
3c0e092e | 16 | For more information about this error, try `rustc --explain E0700`. |