about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-12-01 06:00:33 +0000
committerbors <bors@rust-lang.org>2019-12-01 06:00:33 +0000
commit4007d4ef26eab44bdabc2b7574d032152264d3ad (patch)
treefeada823fc5b16040da2f7aba36cda434f0b2fa4 /src/test
parent135ccbaca86ed4b9c0efaf0cd31442eae57ffad7 (diff)
parentbed4c09d21aceb440ee61091b68dd653da32b45b (diff)
downloadrust-4007d4ef26eab44bdabc2b7574d032152264d3ad.tar.gz
rust-4007d4ef26eab44bdabc2b7574d032152264d3ad.zip
Auto merge of #66917 - Centril:rollup-xj2enik, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #66503 (More useful test error messages on should_panic(expected=...) mismatch)
 - #66662 (Miri: run panic-catching tests in liballoc)
 - #66679 (Improve lifetime errors with implicit trait object lifetimes)
 - #66726 (Use recursion_limit for const eval stack limit)
 - #66790 (Do `min_const_fn` checks for `SetDiscriminant`s target)
 - #66832 (const_prop: detect and avoid catching Miri errors that require allocation)
 - #66880 (Add long error code explanation message for E0203)
 - #66890 (Format liballoc with rustfmt)
 - #66896 (pass Queries to compiler callbacks)

Failed merges:

r? @ghost
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/async-await/issues/issue-63388-1.nll.stderr4
-rw-r--r--src/test/ui/maybe-bounds-where.stderr1
-rw-r--r--src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr6
-rw-r--r--src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr21
-rw-r--r--src/test/ui/self/elision/lt-ref-self-async.nll.stderr42
-rw-r--r--src/test/ui/self/elision/ref-mut-self-async.nll.stderr42
-rw-r--r--src/test/ui/self/elision/ref-mut-struct-async.nll.stderr35
-rw-r--r--src/test/ui/self/elision/ref-struct-async.nll.stderr35
8 files changed, 83 insertions, 103 deletions
diff --git a/src/test/ui/async-await/issues/issue-63388-1.nll.stderr b/src/test/ui/async-await/issues/issue-63388-1.nll.stderr
index 22610fe54a4..4ae3971e90e 100644
--- a/src/test/ui/async-await/issues/issue-63388-1.nll.stderr
+++ b/src/test/ui/async-await/issues/issue-63388-1.nll.stderr
@@ -12,12 +12,12 @@ error: lifetime may not live long enough
 LL |       async fn do_sth<'a>(
    |                       -- lifetime `'a` defined here
 LL |           &'a self, foo: &dyn Foo
-   |                          - lifetime `'_` defined here
+   |                          - let's call the lifetime of this reference `'1`
 LL |       ) -> &dyn Foo
 LL | /     {
 LL | |         foo
 LL | |     }
-   | |_____^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'_`
+   | |_____^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/maybe-bounds-where.stderr b/src/test/ui/maybe-bounds-where.stderr
index 15cbce46f0a..19f9cd28a9a 100644
--- a/src/test/ui/maybe-bounds-where.stderr
+++ b/src/test/ui/maybe-bounds-where.stderr
@@ -42,3 +42,4 @@ LL | struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
 
 error: aborting due to 6 previous errors
 
+For more information about this error, try `rustc --explain E0203`.
diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr
index 713d4b75909..5a63553adc5 100644
--- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr
+++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr
@@ -2,11 +2,11 @@ error: lifetime may not live long enough
   --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:48
    |
 LL |     async fn f(self: Pin<&Self>) -> impl Clone { self }
-   |                          -                     ^^^^^^^^ returning this value requires that `'_` must outlive `'static`
+   |                          -                     ^^^^^^^^ returning this value requires that `'1` must outlive `'static`
    |                          |
-   |                          lifetime `'_` defined here
+   |                          let's call the lifetime of this reference `'1`
    |
-help: to allow this `impl Trait` to capture borrowed data with lifetime `'_`, add `'_` as a constraint
+help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a constraint
    |
 LL |     async fn f(self: Pin<&Self>) -> impl Clone + '_ { self }
    |                                     ^^^^^^^^^^^^^^^
diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr
index 7eec31d36e3..b05940fd273 100644
--- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr
+++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr
@@ -10,19 +10,19 @@ error: lifetime may not live long enough
   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:52
    |
 LL |     async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
-   |                          -                         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
-   |                          |
-   |                          lifetime `'_` defined here
-   |                          lifetime `'_` defined here
+   |                          -         -               ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
+   |                          |         |
+   |                          |         let's call the lifetime of this reference `'1`
+   |                          let's call the lifetime of this reference `'2`
 
 error: lifetime may not live long enough
   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:75
    |
 LL |     async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
-   |                          -                                                ^^^^^^^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
-   |                          |
-   |                          lifetime `'_` defined here
-   |                          lifetime `'_` defined here
+   |                          -          -                                     ^^^^^^^^^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
+   |                          |          |
+   |                          |          let's call the lifetime of this reference `'1`
+   |                          let's call the lifetime of this reference `'2`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:58
@@ -36,8 +36,9 @@ error: lifetime may not live long enough
   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:64
    |
 LL |     async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
-   |                  --              - lifetime `'_` defined here  ^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'a`
-   |                  |
+   |                  --              -                             ^^^ function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
+   |                  |               |
+   |                  |               let's call the lifetime of this reference `'1`
    |                  lifetime `'a` defined here
 
 error: aborting due to 5 previous errors
diff --git a/src/test/ui/self/elision/lt-ref-self-async.nll.stderr b/src/test/ui/self/elision/lt-ref-self-async.nll.stderr
index 1288759703f..8dd823a2204 100644
--- a/src/test/ui/self/elision/lt-ref-self-async.nll.stderr
+++ b/src/test/ui/self/elision/lt-ref-self-async.nll.stderr
@@ -10,12 +10,11 @@ error: lifetime may not live long enough
   --> $DIR/lt-ref-self-async.rs:13:9
    |
 LL |     async fn ref_self(&self, f: &u32) -> &u32 {
-   |                       -
+   |                       -         - let's call the lifetime of this reference `'1`
    |                       |
-   |                       lifetime `'_` defined here
-   |                       lifetime `'_` defined here
+   |                       let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/lt-ref-self-async.rs:18:48
@@ -29,12 +28,11 @@ error: lifetime may not live long enough
   --> $DIR/lt-ref-self-async.rs:19:9
    |
 LL |     async fn ref_Self(self: &Self, f: &u32) -> &u32 {
-   |                             -
+   |                             -         - let's call the lifetime of this reference `'1`
    |                             |
-   |                             lifetime `'_` defined here
-   |                             lifetime `'_` defined here
+   |                             let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/lt-ref-self-async.rs:22:57
@@ -48,12 +46,11 @@ error: lifetime may not live long enough
   --> $DIR/lt-ref-self-async.rs:23:9
    |
 LL |     async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
-   |                                     -
+   |                                     -          - let's call the lifetime of this reference `'1`
    |                                     |
-   |                                     lifetime `'_` defined here
-   |                                     lifetime `'_` defined here
+   |                                     let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/lt-ref-self-async.rs:26:57
@@ -67,12 +64,11 @@ error: lifetime may not live long enough
   --> $DIR/lt-ref-self-async.rs:27:9
    |
 LL |     async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
-   |                                     -
+   |                                     -          - let's call the lifetime of this reference `'1`
    |                                     |
-   |                                     lifetime `'_` defined here
-   |                                     lifetime `'_` defined here
+   |                                     let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/lt-ref-self-async.rs:30:66
@@ -86,12 +82,11 @@ error: lifetime may not live long enough
   --> $DIR/lt-ref-self-async.rs:31:9
    |
 LL |     async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
-   |                                             -
+   |                                             -           - let's call the lifetime of this reference `'1`
    |                                             |
-   |                                             lifetime `'_` defined here
-   |                                             lifetime `'_` defined here
+   |                                             let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/lt-ref-self-async.rs:34:62
@@ -105,12 +100,11 @@ error: lifetime may not live long enough
   --> $DIR/lt-ref-self-async.rs:35:9
    |
 LL |     async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
-   |                                         -
+   |                                         -           - let's call the lifetime of this reference `'1`
    |                                         |
-   |                                         lifetime `'_` defined here
-   |                                         lifetime `'_` defined here
+   |                                         let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: aborting due to 12 previous errors
 
diff --git a/src/test/ui/self/elision/ref-mut-self-async.nll.stderr b/src/test/ui/self/elision/ref-mut-self-async.nll.stderr
index 24e3f7a098f..768f532c183 100644
--- a/src/test/ui/self/elision/ref-mut-self-async.nll.stderr
+++ b/src/test/ui/self/elision/ref-mut-self-async.nll.stderr
@@ -10,12 +10,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-mut-self-async.rs:13:9
    |
 LL |     async fn ref_self(&mut self, f: &u32) -> &u32 {
-   |                       -
+   |                       -             - let's call the lifetime of this reference `'1`
    |                       |
-   |                       lifetime `'_` defined here
-   |                       lifetime `'_` defined here
+   |                       let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-mut-self-async.rs:18:52
@@ -29,12 +28,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-mut-self-async.rs:19:9
    |
 LL |     async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
-   |                             -
+   |                             -             - let's call the lifetime of this reference `'1`
    |                             |
-   |                             lifetime `'_` defined here
-   |                             lifetime `'_` defined here
+   |                             let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-mut-self-async.rs:22:61
@@ -48,12 +46,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-mut-self-async.rs:23:9
    |
 LL |     async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
-   |                                     -
+   |                                     -              - let's call the lifetime of this reference `'1`
    |                                     |
-   |                                     lifetime `'_` defined here
-   |                                     lifetime `'_` defined here
+   |                                     let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-mut-self-async.rs:26:61
@@ -67,12 +64,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-mut-self-async.rs:27:9
    |
 LL |     async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
-   |                                     -
+   |                                     -              - let's call the lifetime of this reference `'1`
    |                                     |
-   |                                     lifetime `'_` defined here
-   |                                     lifetime `'_` defined here
+   |                                     let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-mut-self-async.rs:30:70
@@ -86,12 +82,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-mut-self-async.rs:31:9
    |
 LL |     async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
-   |                                             -
+   |                                             -               - let's call the lifetime of this reference `'1`
    |                                             |
-   |                                             lifetime `'_` defined here
-   |                                             lifetime `'_` defined here
+   |                                             let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-mut-self-async.rs:34:70
@@ -105,12 +100,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-mut-self-async.rs:35:9
    |
 LL |     async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
-   |                                             -
+   |                                             -               - let's call the lifetime of this reference `'1`
    |                                             |
-   |                                             lifetime `'_` defined here
-   |                                             lifetime `'_` defined here
+   |                                             let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: aborting due to 12 previous errors
 
diff --git a/src/test/ui/self/elision/ref-mut-struct-async.nll.stderr b/src/test/ui/self/elision/ref-mut-struct-async.nll.stderr
index c0423d1d3e6..9e26e411d30 100644
--- a/src/test/ui/self/elision/ref-mut-struct-async.nll.stderr
+++ b/src/test/ui/self/elision/ref-mut-struct-async.nll.stderr
@@ -10,12 +10,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-mut-struct-async.rs:13:9
    |
 LL |     async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
-   |                               -
+   |                               -               - let's call the lifetime of this reference `'1`
    |                               |
-   |                               lifetime `'_` defined here
-   |                               lifetime `'_` defined here
+   |                               let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-mut-struct-async.rs:16:65
@@ -29,12 +28,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-mut-struct-async.rs:17:9
    |
 LL |     async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
-   |                                       -
+   |                                       -                - let's call the lifetime of this reference `'1`
    |                                       |
-   |                                       lifetime `'_` defined here
-   |                                       lifetime `'_` defined here
+   |                                       let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-mut-struct-async.rs:20:65
@@ -48,12 +46,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-mut-struct-async.rs:21:9
    |
 LL |     async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
-   |                                       -
+   |                                       -                - let's call the lifetime of this reference `'1`
    |                                       |
-   |                                       lifetime `'_` defined here
-   |                                       lifetime `'_` defined here
+   |                                       let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-mut-struct-async.rs:24:74
@@ -67,12 +64,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-mut-struct-async.rs:25:9
    |
 LL |     async fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
-   |                                               -
+   |                                               -                 - let's call the lifetime of this reference `'1`
    |                                               |
-   |                                               lifetime `'_` defined here
-   |                                               lifetime `'_` defined here
+   |                                               let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-mut-struct-async.rs:28:74
@@ -86,12 +82,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-mut-struct-async.rs:29:9
    |
 LL |     async fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
-   |                                               -
+   |                                               -                 - let's call the lifetime of this reference `'1`
    |                                               |
-   |                                               lifetime `'_` defined here
-   |                                               lifetime `'_` defined here
+   |                                               let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: aborting due to 10 previous errors
 
diff --git a/src/test/ui/self/elision/ref-struct-async.nll.stderr b/src/test/ui/self/elision/ref-struct-async.nll.stderr
index 6f413a7f49f..cbf051205ed 100644
--- a/src/test/ui/self/elision/ref-struct-async.nll.stderr
+++ b/src/test/ui/self/elision/ref-struct-async.nll.stderr
@@ -10,12 +10,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-struct-async.rs:13:9
    |
 LL |     async fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
-   |                               -
+   |                               -           - let's call the lifetime of this reference `'1`
    |                               |
-   |                               lifetime `'_` defined here
-   |                               lifetime `'_` defined here
+   |                               let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-struct-async.rs:16:61
@@ -29,12 +28,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-struct-async.rs:17:9
    |
 LL |     async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
-   |                                       -
+   |                                       -            - let's call the lifetime of this reference `'1`
    |                                       |
-   |                                       lifetime `'_` defined here
-   |                                       lifetime `'_` defined here
+   |                                       let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-struct-async.rs:20:61
@@ -48,12 +46,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-struct-async.rs:21:9
    |
 LL |     async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
-   |                                       -
+   |                                       -            - let's call the lifetime of this reference `'1`
    |                                       |
-   |                                       lifetime `'_` defined here
-   |                                       lifetime `'_` defined here
+   |                                       let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-struct-async.rs:24:70
@@ -67,12 +64,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-struct-async.rs:25:9
    |
 LL |     async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
-   |                                               -
+   |                                               -             - let's call the lifetime of this reference `'1`
    |                                               |
-   |                                               lifetime `'_` defined here
-   |                                               lifetime `'_` defined here
+   |                                               let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
   --> $DIR/ref-struct-async.rs:28:66
@@ -86,12 +82,11 @@ error: lifetime may not live long enough
   --> $DIR/ref-struct-async.rs:29:9
    |
 LL |     async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
-   |                                           -
+   |                                           -             - let's call the lifetime of this reference `'1`
    |                                           |
-   |                                           lifetime `'_` defined here
-   |                                           lifetime `'_` defined here
+   |                                           let's call the lifetime of this reference `'2`
 LL |         f
-   |         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
+   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: aborting due to 10 previous errors