]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.stderr
Pin panic-in-drop=abort test to old pass manager
[rust.git] / src / test / ui / self / arbitrary_self_types_pin_lifetime_mismatch-async.stderr
1 error[E0623]: lifetime mismatch
2   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:52
3    |
4 LL |     async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
5    |                          ----               ----   ^ ...but data from `f` is held across an await point here
6    |                          |                  |
7    |                          |                  this `async fn` implicitly returns an `impl Future<Output = &Foo>`
8    |                          this parameter and the returned future are declared with different lifetimes...
9
10 error[E0623]: lifetime mismatch
11   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:82
12    |
13 LL |     async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
14    |                          -----                        -----------------          ^ ...but data from `f` is held across an await point here
15    |                          |                            |
16    |                          |                            this `async fn` implicitly returns an `impl Future<Output = (Pin<&Foo>, &Foo)>`
17    |                          this parameter and the returned future are declared with different lifetimes...
18
19 error[E0623]: lifetime mismatch
20   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:64
21    |
22 LL |     async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
23    |                                  -----                   ---   ^^^ ...but data from `arg` is held across an await point here
24    |                                  |                       |
25    |                                  |                       this `async fn` implicitly returns an `impl Future<Output = &()>`
26    |                                  this parameter and the returned future are declared with different lifetimes...
27
28 error: aborting due to 3 previous errors
29
30 For more information about this error, try `rustc --explain E0623`.