]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr
Update ui tests
[rust.git] / src / test / ui / self / arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr
1 error: lifetime may not live long enough
2   --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:48
3    |
4 LL |     async fn f(self: Pin<&Self>) -> impl Clone { self }
5    |                          -                     ^^^^^^^^ returning this value requires that `'_` must outlive `'static`
6    |                          |
7    |                          lifetime `'_` defined here
8 help: to allow this `impl Trait` to capture borrowed data with lifetime `'_`, add `'_` as a constraint
9    |
10 LL |     async fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
11    |                                     ^^^^^^^^^^^^^^^
12
13 error: aborting due to previous error
14