|
| 1 | +error[E0106]: missing lifetime specifier |
| 2 | + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:10:45 |
| 3 | + | |
| 4 | +LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } |
| 5 | + | ^ |
| 6 | + | |
| 7 | + = note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple. |
| 8 | + |
| 9 | +error[E0106]: missing lifetime specifier |
| 10 | + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:15:60 |
| 11 | + | |
| 12 | +LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } |
| 13 | + | ^ |
| 14 | + | |
| 15 | + = note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple. |
| 16 | + |
| 17 | +error[E0106]: missing lifetime specifier |
| 18 | + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:15:67 |
| 19 | + | |
| 20 | +LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } |
| 21 | + | ^ |
| 22 | + | |
| 23 | + = note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple. |
| 24 | + |
| 25 | +error: cannot infer an appropriate lifetime |
| 26 | + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:10:33 |
| 27 | + | |
| 28 | +LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } |
| 29 | + | ^ ---- this return type evaluates to the `'static` lifetime... |
| 30 | + | | |
| 31 | + | ...but this borrow... |
| 32 | + | |
| 33 | +note: ...can't outlive the lifetime '_ as defined on the method body at 10:26 |
| 34 | + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:10:26 |
| 35 | + | |
| 36 | +LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } |
| 37 | + | ^ |
| 38 | +help: you can add a constraint to the return type to make it last less than `'static` and match the lifetime '_ as defined on the method body at 10:26 |
| 39 | + | |
| 40 | +LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo + '_ { f } |
| 41 | + | ^^^^^^^^^ |
| 42 | + |
| 43 | +error: cannot infer an appropriate lifetime |
| 44 | + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:15:16 |
| 45 | + | |
| 46 | +LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } |
| 47 | + | ^^^^ ...but this borrow... ----------------- this return type evaluates to the `'static` lifetime... |
| 48 | + | |
| 49 | +note: ...can't outlive the lifetime '_ as defined on the method body at 15:26 |
| 50 | + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:15:26 |
| 51 | + | |
| 52 | +LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } |
| 53 | + | ^ |
| 54 | +help: you can add a constraint to the return type to make it last less than `'static` and match the lifetime '_ as defined on the method body at 15:26 |
| 55 | + | |
| 56 | +LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) + '_ { (self, f) } |
| 57 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 58 | + |
| 59 | +error: cannot infer an appropriate lifetime |
| 60 | + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:15:34 |
| 61 | + | |
| 62 | +LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } |
| 63 | + | ^ ----------------- this return type evaluates to the `'static` lifetime... |
| 64 | + | | |
| 65 | + | ...but this borrow... |
| 66 | + | |
| 67 | +note: ...can't outlive the lifetime '_ as defined on the method body at 15:26 |
| 68 | + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:15:26 |
| 69 | + | |
| 70 | +LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } |
| 71 | + | ^ |
| 72 | +help: you can add a constraint to the return type to make it last less than `'static` and match the lifetime '_ as defined on the method body at 15:26 |
| 73 | + | |
| 74 | +LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) + '_ { (self, f) } |
| 75 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 76 | + |
| 77 | +error[E0623]: lifetime mismatch |
| 78 | + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:25:58 |
| 79 | + | |
| 80 | +LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } |
| 81 | + | ----- ^^^ |
| 82 | + | | | |
| 83 | + | | ...but data from `arg` is returned here |
| 84 | + | this parameter and the return type are declared with different lifetimes... |
| 85 | + |
| 86 | +error: aborting due to 7 previous errors |
| 87 | + |
| 88 | +For more information about this error, try `rustc --explain E0106`. |
0 commit comments