1 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2 --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:45
4 LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
7 = note: hidden type `impl std::future::Future` captures lifetime '_#15r
9 error: lifetime may not live long enough
10 --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:52
12 LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
13 | - - ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
15 | | let's call the lifetime of this reference `'1`
16 | let's call the lifetime of this reference `'2`
18 error: lifetime may not live long enough
19 --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:75
21 LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
22 | - - ^^^^^^^^^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
24 | | let's call the lifetime of this reference `'1`
25 | let's call the lifetime of this reference `'2`
27 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
28 --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:58
30 LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
33 = note: hidden type `impl std::future::Future` captures lifetime '_#15r
35 error: lifetime may not live long enough
36 --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:64
38 LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
39 | -- - ^^^ function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
41 | | let's call the lifetime of this reference `'1`
42 | lifetime `'a` defined here
44 error: aborting due to 5 previous errors
46 For more information about this error, try `rustc --explain E0700`.