about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/async-await/issue-76547.stderr14
-rw-r--r--src/test/ui/async-await/issues/issue-63388-1.stderr2
-rw-r--r--src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.stderr24
-rw-r--r--src/test/ui/self/elision/lt-ref-self-async.stderr48
-rw-r--r--src/test/ui/self/elision/ref-mut-self-async.stderr48
-rw-r--r--src/test/ui/self/elision/ref-mut-struct-async.stderr40
-rw-r--r--src/test/ui/self/elision/ref-self-async.stderr56
-rw-r--r--src/test/ui/self/elision/ref-struct-async.stderr40
8 files changed, 133 insertions, 139 deletions
diff --git a/src/test/ui/async-await/issue-76547.stderr b/src/test/ui/async-await/issue-76547.stderr
index 9bfb0f28028..ac5f99970c8 100644
--- a/src/test/ui/async-await/issue-76547.stderr
+++ b/src/test/ui/async-await/issue-76547.stderr
@@ -2,23 +2,17 @@ error[E0623]: lifetime mismatch
   --> $DIR/issue-76547.rs:20:13
    |
 LL | async fn fut(bufs: &mut [&mut [u8]]) {
-   |                          ---------   -
-   |                          |           |
-   |                          |           this `async fn` implicitly returns an `impl Future<Output = ()>`
-   |                          this parameter and the returned future are declared with different lifetimes...
+   |                    ---------------- these two types are declared with different lifetimes...
 LL |     ListFut(bufs).await
-   |             ^^^^ ...but data from `bufs` is held across an await point here
+   |             ^^^^ ...but data from `bufs` flows into `bufs` here
 
 error[E0623]: lifetime mismatch
   --> $DIR/issue-76547.rs:34:14
    |
 LL | async fn fut2(bufs: &mut [&mut [u8]]) -> i32 {
-   |                           ---------      ---
-   |                           |              |
-   |                           |              this `async fn` implicitly returns an `impl Future<Output = i32>`
-   |                           this parameter and the returned future are declared with different lifetimes...
+   |                     ---------------- these two types are declared with different lifetimes...
 LL |     ListFut2(bufs).await
-   |              ^^^^ ...but data from `bufs` is held across an await point here
+   |              ^^^^ ...but data from `bufs` flows into `bufs` here
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/async-await/issues/issue-63388-1.stderr b/src/test/ui/async-await/issues/issue-63388-1.stderr
index ac29cca9d3f..32ca7afd82d 100644
--- a/src/test/ui/async-await/issues/issue-63388-1.stderr
+++ b/src/test/ui/async-await/issues/issue-63388-1.stderr
@@ -2,7 +2,7 @@ error[E0623]: lifetime mismatch
   --> $DIR/issue-63388-1.rs:14:9
    |
 LL |         &'a self, foo: &dyn Foo
-   |         -------- this parameter and the returned future are declared with different lifetimes...
+   |                        -------- this parameter and the returned future are declared with different lifetimes...
 LL |     ) -> &dyn Foo
    |          --------
    |          |
diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.stderr
index e6846fb4049..6986cd1a5fd 100644
--- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.stderr
+++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.stderr
@@ -2,28 +2,28 @@ error[E0623]: lifetime mismatch
   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:52
    |
 LL |     async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
-   |                          ----               ----   ^ ...but data from `f` is held across an await point here
-   |                          |                  |
-   |                          |                  this `async fn` implicitly returns an `impl Future<Output = &Foo>`
-   |                          this parameter and the returned future are declared with different lifetimes...
+   |                                    ----     ----   ^ ...but data from `f` is held across an await point here
+   |                                    |        |
+   |                                    |        this `async fn` implicitly returns an `impl Future<Output = &Foo>`
+   |                                    this parameter and the returned future are declared with different lifetimes...
 
 error[E0623]: lifetime mismatch
   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:82
    |
 LL |     async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
-   |                          -----                        -----------------          ^ ...but data from `f` is held across an await point here
-   |                          |                            |
-   |                          |                            this `async fn` implicitly returns an `impl Future<Output = (Pin<&Foo>, &Foo)>`
-   |                          this parameter and the returned future are declared with different lifetimes...
+   |                                     ----              -----------------          ^ ...but data from `f` is held across an await point here
+   |                                     |                 |
+   |                                     |                 this `async fn` implicitly returns an `impl Future<Output = (Pin<&Foo>, &Foo)>`
+   |                                     this parameter and the returned future are declared with different lifetimes...
 
 error[E0623]: lifetime mismatch
   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:64
    |
 LL |     async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
-   |                                  -----                   ---   ^^^ ...but data from `arg` is held across an await point here
-   |                                  |                       |
-   |                                  |                       this `async fn` implicitly returns an `impl Future<Output = &()>`
-   |                                  this parameter and the returned future are declared with different lifetimes...
+   |                                               ------     ---   ^^^ ...but data from `arg` is held across an await point here
+   |                                               |          |
+   |                                               |          this `async fn` implicitly returns an `impl Future<Output = &()>`
+   |                                               this parameter and the returned future are declared with different lifetimes...
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/self/elision/lt-ref-self-async.stderr b/src/test/ui/self/elision/lt-ref-self-async.stderr
index 3221d270850..d65a6ade037 100644
--- a/src/test/ui/self/elision/lt-ref-self-async.stderr
+++ b/src/test/ui/self/elision/lt-ref-self-async.stderr
@@ -2,10 +2,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/lt-ref-self-async.rs:13:9
    |
 LL |     async fn ref_self(&self, f: &u32) -> &u32 {
-   |                       -----              ----
-   |                       |                  |
-   |                       |                  this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                       this parameter and the returned future are declared with different lifetimes...
+   |                                 ----     ----
+   |                                 |        |
+   |                                 |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                 this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -13,10 +13,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/lt-ref-self-async.rs:19:9
    |
 LL |     async fn ref_Self(self: &Self, f: &u32) -> &u32 {
-   |                             -----              ----
-   |                             |                  |
-   |                             |                  this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                             this parameter and the returned future are declared with different lifetimes...
+   |                                       ----     ----
+   |                                       |        |
+   |                                       |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                       this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -24,10 +24,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/lt-ref-self-async.rs:23:9
    |
 LL |     async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
-   |                                     -----               ----
-   |                                     |                   |
-   |                                     |                   this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                     this parameter and the returned future are declared with different lifetimes...
+   |                                                ----     ----
+   |                                                |        |
+   |                                                |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -35,10 +35,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/lt-ref-self-async.rs:27:9
    |
 LL |     async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
-   |                                     -----               ----
-   |                                     |                   |
-   |                                     |                   this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                     this parameter and the returned future are declared with different lifetimes...
+   |                                                ----     ----
+   |                                                |        |
+   |                                                |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -46,10 +46,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/lt-ref-self-async.rs:31:9
    |
 LL |     async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
-   |                                             -----                ----
-   |                                             |                    |
-   |                                             |                    this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                             this parameter and the returned future are declared with different lifetimes...
+   |                                                         ----     ----
+   |                                                         |        |
+   |                                                         |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                         this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -57,10 +57,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/lt-ref-self-async.rs:35:9
    |
 LL |     async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
-   |                                         -----                ----
-   |                                         |                    |
-   |                                         |                    this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                         this parameter and the returned future are declared with different lifetimes...
+   |                                                     ----     ----
+   |                                                     |        |
+   |                                                     |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                     this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
diff --git a/src/test/ui/self/elision/ref-mut-self-async.stderr b/src/test/ui/self/elision/ref-mut-self-async.stderr
index b6ca986923d..c4f7b7eb625 100644
--- a/src/test/ui/self/elision/ref-mut-self-async.stderr
+++ b/src/test/ui/self/elision/ref-mut-self-async.stderr
@@ -2,10 +2,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-mut-self-async.rs:13:9
    |
 LL |     async fn ref_self(&mut self, f: &u32) -> &u32 {
-   |                       ---------              ----
-   |                       |                      |
-   |                       |                      this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                       this parameter and the returned future are declared with different lifetimes...
+   |                                     ----     ----
+   |                                     |        |
+   |                                     |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                     this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -13,10 +13,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-mut-self-async.rs:19:9
    |
 LL |     async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
-   |                             ---------              ----
-   |                             |                      |
-   |                             |                      this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                             this parameter and the returned future are declared with different lifetimes...
+   |                                           ----     ----
+   |                                           |        |
+   |                                           |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                           this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -24,10 +24,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-mut-self-async.rs:23:9
    |
 LL |     async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
-   |                                     ---------               ----
-   |                                     |                       |
-   |                                     |                       this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                     this parameter and the returned future are declared with different lifetimes...
+   |                                                    ----     ----
+   |                                                    |        |
+   |                                                    |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                    this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -35,10 +35,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-mut-self-async.rs:27:9
    |
 LL |     async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
-   |                                     ---------               ----
-   |                                     |                       |
-   |                                     |                       this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                     this parameter and the returned future are declared with different lifetimes...
+   |                                                    ----     ----
+   |                                                    |        |
+   |                                                    |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                    this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -46,10 +46,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-mut-self-async.rs:31:9
    |
 LL |     async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
-   |                                             ---------                ----
-   |                                             |                        |
-   |                                             |                        this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                             this parameter and the returned future are declared with different lifetimes...
+   |                                                             ----     ----
+   |                                                             |        |
+   |                                                             |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                             this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -57,10 +57,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-mut-self-async.rs:35:9
    |
 LL |     async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
-   |                                             ---------                ----
-   |                                             |                        |
-   |                                             |                        this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                             this parameter and the returned future are declared with different lifetimes...
+   |                                                             ----     ----
+   |                                                             |        |
+   |                                                             |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                             this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
diff --git a/src/test/ui/self/elision/ref-mut-struct-async.stderr b/src/test/ui/self/elision/ref-mut-struct-async.stderr
index eda15d76390..6c5edcb2b36 100644
--- a/src/test/ui/self/elision/ref-mut-struct-async.stderr
+++ b/src/test/ui/self/elision/ref-mut-struct-async.stderr
@@ -2,10 +2,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-mut-struct-async.rs:13:9
    |
 LL |     async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
-   |                               -----------              ----
-   |                               |                        |
-   |                               |                        this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                               this parameter and the returned future are declared with different lifetimes...
+   |                                               ----     ----
+   |                                               |        |
+   |                                               |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                               this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -13,10 +13,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-mut-struct-async.rs:17:9
    |
 LL |     async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
-   |                                       -----------               ----
-   |                                       |                         |
-   |                                       |                         this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                       this parameter and the returned future are declared with different lifetimes...
+   |                                                        ----     ----
+   |                                                        |        |
+   |                                                        |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                        this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -24,10 +24,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-mut-struct-async.rs:21:9
    |
 LL |     async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
-   |                                       -----------               ----
-   |                                       |                         |
-   |                                       |                         this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                       this parameter and the returned future are declared with different lifetimes...
+   |                                                        ----     ----
+   |                                                        |        |
+   |                                                        |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                        this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -35,10 +35,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-mut-struct-async.rs:25:9
    |
 LL |     async fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
-   |                                               -----------                ----
-   |                                               |                          |
-   |                                               |                          this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                               this parameter and the returned future are declared with different lifetimes...
+   |                                                                 ----     ----
+   |                                                                 |        |
+   |                                                                 |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                                 this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -46,10 +46,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-mut-struct-async.rs:29:9
    |
 LL |     async fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
-   |                                               -----------                ----
-   |                                               |                          |
-   |                                               |                          this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                               this parameter and the returned future are declared with different lifetimes...
+   |                                                                 ----     ----
+   |                                                                 |        |
+   |                                                                 |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                                 this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
diff --git a/src/test/ui/self/elision/ref-self-async.stderr b/src/test/ui/self/elision/ref-self-async.stderr
index b42caa88c6f..fef346b4d2a 100644
--- a/src/test/ui/self/elision/ref-self-async.stderr
+++ b/src/test/ui/self/elision/ref-self-async.stderr
@@ -2,10 +2,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-self-async.rs:23:9
    |
 LL |     async fn ref_self(&self, f: &u32) -> &u32 {
-   |                       -----              ----
-   |                       |                  |
-   |                       |                  this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                       this parameter and the returned future are declared with different lifetimes...
+   |                                 ----     ----
+   |                                 |        |
+   |                                 |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                 this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -13,10 +13,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-self-async.rs:29:9
    |
 LL |     async fn ref_Self(self: &Self, f: &u32) -> &u32 {
-   |                             -----              ----
-   |                             |                  |
-   |                             |                  this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                             this parameter and the returned future are declared with different lifetimes...
+   |                                       ----     ----
+   |                                       |        |
+   |                                       |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                       this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -24,10 +24,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-self-async.rs:33:9
    |
 LL |     async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
-   |                                     -----               ----
-   |                                     |                   |
-   |                                     |                   this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                     this parameter and the returned future are declared with different lifetimes...
+   |                                                ----     ----
+   |                                                |        |
+   |                                                |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -35,10 +35,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-self-async.rs:37:9
    |
 LL |     async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
-   |                                     -----               ----
-   |                                     |                   |
-   |                                     |                   this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                     this parameter and the returned future are declared with different lifetimes...
+   |                                                ----     ----
+   |                                                |        |
+   |                                                |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -46,10 +46,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-self-async.rs:41:9
    |
 LL |     async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
-   |                                             -----                ----
-   |                                             |                    |
-   |                                             |                    this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                             this parameter and the returned future are declared with different lifetimes...
+   |                                                         ----     ----
+   |                                                         |        |
+   |                                                         |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                         this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -57,10 +57,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-self-async.rs:45:9
    |
 LL |     async fn box_pin_ref_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
-   |                                             -----                ----
-   |                                             |                    |
-   |                                             |                    this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                             this parameter and the returned future are declared with different lifetimes...
+   |                                                         ----     ----
+   |                                                         |        |
+   |                                                         |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                         this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -68,10 +68,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-self-async.rs:49:9
    |
 LL |     async fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 {
-   |                                            -----                    ---
-   |                                            |                        |
-   |                                            |                        this `async fn` implicitly returns an `impl Future<Output = &u8>`
-   |                                            this parameter and the returned future are declared with different lifetimes...
+   |                                                             ---     ---
+   |                                                             |       |
+   |                                                             |       this `async fn` implicitly returns an `impl Future<Output = &u8>`
+   |                                                             this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
diff --git a/src/test/ui/self/elision/ref-struct-async.stderr b/src/test/ui/self/elision/ref-struct-async.stderr
index 599becd3080..cc269c0e7aa 100644
--- a/src/test/ui/self/elision/ref-struct-async.stderr
+++ b/src/test/ui/self/elision/ref-struct-async.stderr
@@ -2,10 +2,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-struct-async.rs:13:9
    |
 LL |     async fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
-   |                               -------              ----
-   |                               |                    |
-   |                               |                    this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                               this parameter and the returned future are declared with different lifetimes...
+   |                                           ----     ----
+   |                                           |        |
+   |                                           |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                           this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -13,10 +13,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-struct-async.rs:17:9
    |
 LL |     async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
-   |                                       -------               ----
-   |                                       |                     |
-   |                                       |                     this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                       this parameter and the returned future are declared with different lifetimes...
+   |                                                    ----     ----
+   |                                                    |        |
+   |                                                    |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                    this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -24,10 +24,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-struct-async.rs:21:9
    |
 LL |     async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
-   |                                       -------               ----
-   |                                       |                     |
-   |                                       |                     this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                       this parameter and the returned future are declared with different lifetimes...
+   |                                                    ----     ----
+   |                                                    |        |
+   |                                                    |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                    this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -35,10 +35,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-struct-async.rs:25:9
    |
 LL |     async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
-   |                                               -------                ----
-   |                                               |                      |
-   |                                               |                      this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                               this parameter and the returned future are declared with different lifetimes...
+   |                                                             ----     ----
+   |                                                             |        |
+   |                                                             |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                             this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here
 
@@ -46,10 +46,10 @@ error[E0623]: lifetime mismatch
   --> $DIR/ref-struct-async.rs:29:9
    |
 LL |     async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
-   |                                           -------                ----
-   |                                           |                      |
-   |                                           |                      this `async fn` implicitly returns an `impl Future<Output = &u32>`
-   |                                           this parameter and the returned future are declared with different lifetimes...
+   |                                                         ----     ----
+   |                                                         |        |
+   |                                                         |        this `async fn` implicitly returns an `impl Future<Output = &u32>`
+   |                                                         this parameter and the returned future are declared with different lifetimes...
 LL |         f
    |         ^ ...but data from `f` is held across an await point here