]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr
Rollup merge of #90498 - joshtriplett:target-tier-policy-draft-updates, r=Mark-Simulacrum
[rust.git] / src / test / ui / self / arbitrary_self_types_pin_lifetime_impl_trait-async.stderr
1 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2   --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:37
3    |
4 LL |     async fn f(self: Pin<&Self>) -> impl Clone { self }
5    |                          -          ^^^^^^^^^^
6    |                          |
7    |                          hidden type `Pin<&Foo>` captures the lifetime `'_` as defined here
8    |
9 help: to declare that the `impl Trait` captures `'_`, you can add an explicit `'_` lifetime bound
10    |
11 LL |     async 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`.