about summary refs log tree commit diff
diff options
context:
space:
mode:
authormarmeladema <xademax@gmail.com>2022-04-17 15:39:25 +0200
committermarmeladema <xademax@gmail.com>2022-04-17 15:39:25 +0200
commite818f45cd3f8f02801d81cd23c04f6adc1b41812 (patch)
tree0fab30f5bbb6ec04d5483d0577700f5f3c55d795
parent3f391b84552f210adec7893b50c5da74f9362ae4 (diff)
downloadrust-e818f45cd3f8f02801d81cd23c04f6adc1b41812.tar.gz
rust-e818f45cd3f8f02801d81cd23c04f6adc1b41812.zip
Use revisions instead of nll compare mode for `/self/` ui tests
-rw-r--r--src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.base.stderr (renamed from src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.stderr)6
-rw-r--r--src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr6
-rw-r--r--src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs13
-rw-r--r--src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.base.stderr (renamed from src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.stderr)6
-rw-r--r--src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr6
-rw-r--r--src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.rs16
-rw-r--r--src/test/ui/self/elision/lt-ref-self-async.base.stderr (renamed from src/test/ui/self/elision/lt-ref-self-async.stderr)12
-rw-r--r--src/test/ui/self/elision/lt-ref-self-async.nll.stderr12
-rw-r--r--src/test/ui/self/elision/lt-ref-self-async.rs27
-rw-r--r--src/test/ui/self/elision/lt-ref-self.base.stderr (renamed from src/test/ui/self/elision/lt-ref-self.stderr)12
-rw-r--r--src/test/ui/self/elision/lt-ref-self.nll.stderr12
-rw-r--r--src/test/ui/self/elision/lt-ref-self.rs28
-rw-r--r--src/test/ui/self/elision/ref-mut-self-async.base.stderr (renamed from src/test/ui/self/elision/ref-mut-self-async.stderr)12
-rw-r--r--src/test/ui/self/elision/ref-mut-self-async.nll.stderr12
-rw-r--r--src/test/ui/self/elision/ref-mut-self-async.rs27
-rw-r--r--src/test/ui/self/elision/ref-mut-self.base.stderr (renamed from src/test/ui/self/elision/ref-mut-self.stderr)12
-rw-r--r--src/test/ui/self/elision/ref-mut-self.nll.stderr12
-rw-r--r--src/test/ui/self/elision/ref-mut-self.rs28
-rw-r--r--src/test/ui/self/elision/ref-mut-struct-async.base.stderr (renamed from src/test/ui/self/elision/ref-mut-struct-async.stderr)10
-rw-r--r--src/test/ui/self/elision/ref-mut-struct-async.nll.stderr10
-rw-r--r--src/test/ui/self/elision/ref-mut-struct-async.rs23
-rw-r--r--src/test/ui/self/elision/ref-mut-struct.base.stderr (renamed from src/test/ui/self/elision/ref-mut-struct.stderr)10
-rw-r--r--src/test/ui/self/elision/ref-mut-struct.nll.stderr10
-rw-r--r--src/test/ui/self/elision/ref-mut-struct.rs24
-rw-r--r--src/test/ui/self/elision/ref-self-async.base.stderr (renamed from src/test/ui/self/elision/ref-self-async.stderr)14
-rw-r--r--src/test/ui/self/elision/ref-self-async.nll.stderr14
-rw-r--r--src/test/ui/self/elision/ref-self-async.rs31
-rw-r--r--src/test/ui/self/elision/ref-self.base.stderr (renamed from src/test/ui/self/elision/ref-self.stderr)14
-rw-r--r--src/test/ui/self/elision/ref-self.nll.stderr14
-rw-r--r--src/test/ui/self/elision/ref-self.rs32
-rw-r--r--src/test/ui/self/elision/ref-struct-async.base.stderr (renamed from src/test/ui/self/elision/ref-struct-async.stderr)10
-rw-r--r--src/test/ui/self/elision/ref-struct-async.nll.stderr10
-rw-r--r--src/test/ui/self/elision/ref-struct-async.rs23
-rw-r--r--src/test/ui/self/elision/ref-struct.base.stderr (renamed from src/test/ui/self/elision/ref-struct.stderr)10
-rw-r--r--src/test/ui/self/elision/ref-struct.nll.stderr10
-rw-r--r--src/test/ui/self/elision/ref-struct.rs24
36 files changed, 360 insertions, 192 deletions
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.base.stderr
index 299a2d2f2d3..7985bf266d8 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.base.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:52
+  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:52
    |
 LL |     async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
    |                                    ----     ----   ^ ...but data from `f` is returned here
@@ -7,7 +7,7 @@ LL |     async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
    |                                    this parameter and the return type are declared with different lifetimes...
 
 error[E0623]: lifetime mismatch
-  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:82
+  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:15:82
    |
 LL |     async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
    |                                     ----              -----------------          ^ ...but data from `f` is returned here
@@ -15,7 +15,7 @@ LL |     async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (
    |                                     this parameter and the return type are declared with different lifetimes...
 
 error[E0623]: lifetime mismatch
-  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:64
+  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:22:64
    |
 LL |     async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
    |                                               ------     ---   ^^^ ...but data from `arg` is returned here
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 57374b7e3bb..8a55a7c34d7 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
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:52
+  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:52
    |
 LL |     async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
    |                          -         -               ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
@@ -8,7 +8,7 @@ LL |     async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
    |                          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
+  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:15:75
    |
 LL |     async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
    |                          -          -                                     ^^^^^^^^^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
@@ -17,7 +17,7 @@ LL |     async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (
    |                          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:17:64
+  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:22:64
    |
 LL |     async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
    |                  --              -                             ^^^ associated function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs
index f42337d5340..c54f7963c23 100644
--- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs
+++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs
@@ -1,4 +1,7 @@
 // edition:2018
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
 
 use std::pin::Pin;
 
@@ -6,15 +9,19 @@ struct Foo;
 
 impl Foo {
     async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
-    //~^ ERROR lifetime mismatch
+    //[base]~^ ERROR lifetime mismatch
+    //[nll]~^^ lifetime may not live long enough
 
     async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
-    //~^ ERROR lifetime mismatch
+    //[base]~^ ERROR lifetime mismatch
+    //[nll]~^^ lifetime may not live long enough
 }
 
 type Alias<T> = Pin<T>;
 impl Foo {
-    async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } //~ ERROR E0623
+    async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
+    //[base]~^ ERROR E0623
+    //[nll]~^^ lifetime may not live long enough
 }
 
 fn main() {}
diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.base.stderr
index 64a57469510..c0e2f0bd3e9 100644
--- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.stderr
+++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.base.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:6:46
+  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:10:46
    |
 LL |     fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
    |                              ----     ----   ^ ...but data from `f` is returned here
@@ -13,7 +13,7 @@ LL |     fn a<'a>(self: Pin<&'a Foo>, f: &'a Foo) -> &Foo { f }
    |         ++++            ++           ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:8:76
+  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:14:76
    |
 LL |     fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
    |                               ----              -----------------          ^ ...but data from `f` is returned here
@@ -27,7 +27,7 @@ LL |     fn c<'a>(self: Pin<&'a Self>, f: &'a Foo, g: &Foo) -> (Pin<&Foo>, &Foo)
    |         ++++            ++            ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:13:58
+  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:21:58
    |
 LL |     fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
    |                                         ------     ---   ^^^ ...but data from `arg` is returned here
diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr
index 92241b2fb2d..b06ebf70477 100644
--- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr
+++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:6:46
+  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:10:46
    |
 LL |     fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
    |                    -         -               ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
@@ -8,7 +8,7 @@ LL |     fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
    |                    let's call the lifetime of this reference `'2`
 
 error: lifetime may not live long enough
-  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:8:69
+  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:14:69
    |
 LL |     fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
    |                    -          -                                     ^^^^^^^^^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
@@ -17,7 +17,7 @@ LL |     fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self,
    |                    let's call the lifetime of this reference `'2`
 
 error: lifetime may not live long enough
-  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:13:58
+  --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:21:58
    |
 LL |     fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
    |            --  ---- has type `Pin<&'1 Foo>`              ^^^ associated function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.rs b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.rs
index 8291e44080b..34b08b364fb 100644
--- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.rs
+++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.rs
@@ -1,16 +1,26 @@
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
+
 use std::pin::Pin;
 
 struct Foo;
 
 impl Foo {
-    fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } //~ ERROR E0623
+    fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
+    //[base]~^ ERROR E0623
+    //[nll]~^^ lifetime may not live long enough
 
-    fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } //~ ERROR E0623
+    fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
+    //[base]~^ ERROR E0623
+    //[nll]~^^ lifetime may not live long enough
 }
 
 type Alias<T> = Pin<T>;
 impl Foo {
-    fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } //~ ERROR E0623
+    fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
+    //[base]~^ ERROR E0623
+    //[nll]~^^ lifetime may not live long enough
 }
 
 fn main() {}
diff --git a/src/test/ui/self/elision/lt-ref-self-async.stderr b/src/test/ui/self/elision/lt-ref-self-async.base.stderr
index 7448e8484b4..b4385490614 100644
--- a/src/test/ui/self/elision/lt-ref-self-async.stderr
+++ b/src/test/ui/self/elision/lt-ref-self-async.base.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/lt-ref-self-async.rs:13:9
+  --> $DIR/lt-ref-self-async.rs:16:9
    |
 LL |     async fn ref_self(&self, f: &u32) -> &u32 {
    |                                 ----     ----
@@ -9,7 +9,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/lt-ref-self-async.rs:19:9
+  --> $DIR/lt-ref-self-async.rs:24:9
    |
 LL |     async fn ref_Self(self: &Self, f: &u32) -> &u32 {
    |                                       ----     ----
@@ -19,7 +19,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/lt-ref-self-async.rs:23:9
+  --> $DIR/lt-ref-self-async.rs:30:9
    |
 LL |     async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
    |                                                ----     ----
@@ -29,7 +29,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/lt-ref-self-async.rs:27:9
+  --> $DIR/lt-ref-self-async.rs:36:9
    |
 LL |     async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
    |                                                ----     ----
@@ -39,7 +39,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/lt-ref-self-async.rs:31:9
+  --> $DIR/lt-ref-self-async.rs:42:9
    |
 LL |     async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
    |                                                         ----     ----
@@ -49,7 +49,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/lt-ref-self-async.rs:35:9
+  --> $DIR/lt-ref-self-async.rs:48:9
    |
 LL |     async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
    |                                                     ----     ----
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 c10b8824e6d..2ba9a6596f6 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
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/lt-ref-self-async.rs:13:9
+  --> $DIR/lt-ref-self-async.rs:16:9
    |
 LL |     async fn ref_self(&self, f: &u32) -> &u32 {
    |                       -         - let's call the lifetime of this reference `'1`
@@ -9,7 +9,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/lt-ref-self-async.rs:19:9
+  --> $DIR/lt-ref-self-async.rs:24:9
    |
 LL |     async fn ref_Self(self: &Self, f: &u32) -> &u32 {
    |                             -         - let's call the lifetime of this reference `'1`
@@ -19,7 +19,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/lt-ref-self-async.rs:23:9
+  --> $DIR/lt-ref-self-async.rs:30:9
    |
 LL |     async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
    |                                     -          - let's call the lifetime of this reference `'1`
@@ -29,7 +29,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/lt-ref-self-async.rs:27:9
+  --> $DIR/lt-ref-self-async.rs:36:9
    |
 LL |     async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
    |                                     -          - let's call the lifetime of this reference `'1`
@@ -39,7 +39,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/lt-ref-self-async.rs:31:9
+  --> $DIR/lt-ref-self-async.rs:42:9
    |
 LL |     async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
    |                                             -           - let's call the lifetime of this reference `'1`
@@ -49,7 +49,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/lt-ref-self-async.rs:35:9
+  --> $DIR/lt-ref-self-async.rs:48:9
    |
 LL |     async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
    |                                         -           - let's call the lifetime of this reference `'1`
diff --git a/src/test/ui/self/elision/lt-ref-self-async.rs b/src/test/ui/self/elision/lt-ref-self-async.rs
index ef6cbe7772c..24482b3a278 100644
--- a/src/test/ui/self/elision/lt-ref-self-async.rs
+++ b/src/test/ui/self/elision/lt-ref-self-async.rs
@@ -1,4 +1,7 @@
 // edition:2018
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
 
 #![allow(non_snake_case)]
 
@@ -10,29 +13,41 @@ impl<'a> Struct<'a> {
     // Test using `&self` sugar:
 
     async fn ref_self(&self, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     // Test using `&Self` explicitly:
 
     async fn ref_Self(self: &Self, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 }
 
diff --git a/src/test/ui/self/elision/lt-ref-self.stderr b/src/test/ui/self/elision/lt-ref-self.base.stderr
index 5764ab03c55..0f5cd6fb853 100644
--- a/src/test/ui/self/elision/lt-ref-self.stderr
+++ b/src/test/ui/self/elision/lt-ref-self.base.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/lt-ref-self.rs:11:9
+  --> $DIR/lt-ref-self.rs:15:9
    |
 LL |     fn ref_self(&self, f: &u32) -> &u32 {
    |                           ----     ----
@@ -15,7 +15,7 @@ LL |     fn ref_self<'a>(&'a self, f: &'a u32) -> &u32 {
    |                ++++  ++           ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/lt-ref-self.rs:17:9
+  --> $DIR/lt-ref-self.rs:23:9
    |
 LL |     fn ref_Self(self: &Self, f: &u32) -> &u32 {
    |                                 ----     ----
@@ -31,7 +31,7 @@ LL |     fn ref_Self<'a>(self: &'a Self, f: &'a u32) -> &u32 {
    |                ++++        ++           ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/lt-ref-self.rs:21:9
+  --> $DIR/lt-ref-self.rs:29:9
    |
 LL |     fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
    |                                          ----     ----
@@ -47,7 +47,7 @@ LL |     fn box_ref_Self<'a>(self: Box<&'a Self>, f: &'a u32) -> &u32 {
    |                    ++++            ++            ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/lt-ref-self.rs:25:9
+  --> $DIR/lt-ref-self.rs:35:9
    |
 LL |     fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
    |                                          ----     ----
@@ -63,7 +63,7 @@ LL |     fn pin_ref_Self<'a>(self: Pin<&'a Self>, f: &'a u32) -> &u32 {
    |                    ++++            ++            ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/lt-ref-self.rs:29:9
+  --> $DIR/lt-ref-self.rs:41:9
    |
 LL |     fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
    |                                                   ----     ----
@@ -79,7 +79,7 @@ LL |     fn box_box_ref_Self<'a>(self: Box<Box<&'a Self>>, f: &'a u32) -> &u32 {
    |                        ++++                ++             ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/lt-ref-self.rs:33:9
+  --> $DIR/lt-ref-self.rs:47:9
    |
 LL |     fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
    |                                               ----     ----
diff --git a/src/test/ui/self/elision/lt-ref-self.nll.stderr b/src/test/ui/self/elision/lt-ref-self.nll.stderr
index e2de743b8f6..1934207527b 100644
--- a/src/test/ui/self/elision/lt-ref-self.nll.stderr
+++ b/src/test/ui/self/elision/lt-ref-self.nll.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/lt-ref-self.rs:11:9
+  --> $DIR/lt-ref-self.rs:15:9
    |
 LL |     fn ref_self(&self, f: &u32) -> &u32 {
    |                 -         - let's call the lifetime of this reference `'1`
@@ -9,7 +9,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/lt-ref-self.rs:17:9
+  --> $DIR/lt-ref-self.rs:23:9
    |
 LL |     fn ref_Self(self: &Self, f: &u32) -> &u32 {
    |                       -         - let's call the lifetime of this reference `'1`
@@ -19,7 +19,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/lt-ref-self.rs:21:9
+  --> $DIR/lt-ref-self.rs:29:9
    |
 LL |     fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
    |                               -          - let's call the lifetime of this reference `'1`
@@ -29,7 +29,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/lt-ref-self.rs:25:9
+  --> $DIR/lt-ref-self.rs:35:9
    |
 LL |     fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
    |                               -          - let's call the lifetime of this reference `'1`
@@ -39,7 +39,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/lt-ref-self.rs:29:9
+  --> $DIR/lt-ref-self.rs:41:9
    |
 LL |     fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
    |                                       -           - let's call the lifetime of this reference `'1`
@@ -49,7 +49,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/lt-ref-self.rs:33:9
+  --> $DIR/lt-ref-self.rs:47:9
    |
 LL |     fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
    |                                   -           - let's call the lifetime of this reference `'1`
diff --git a/src/test/ui/self/elision/lt-ref-self.rs b/src/test/ui/self/elision/lt-ref-self.rs
index 423c7d5822d..62bdb13dc0f 100644
--- a/src/test/ui/self/elision/lt-ref-self.rs
+++ b/src/test/ui/self/elision/lt-ref-self.rs
@@ -1,3 +1,7 @@
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
+
 #![allow(non_snake_case)]
 
 use std::pin::Pin;
@@ -8,29 +12,41 @@ impl<'a> Struct<'a> {
     // Test using `&self` sugar:
 
     fn ref_self(&self, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     // Test using `&Self` explicitly:
 
     fn ref_Self(self: &Self, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 }
 
diff --git a/src/test/ui/self/elision/ref-mut-self-async.stderr b/src/test/ui/self/elision/ref-mut-self-async.base.stderr
index 6056cc46d3d..851337552c9 100644
--- a/src/test/ui/self/elision/ref-mut-self-async.stderr
+++ b/src/test/ui/self/elision/ref-mut-self-async.base.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-self-async.rs:13:9
+  --> $DIR/ref-mut-self-async.rs:16:9
    |
 LL |     async fn ref_self(&mut self, f: &u32) -> &u32 {
    |                                     ----     ----
@@ -9,7 +9,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-self-async.rs:19:9
+  --> $DIR/ref-mut-self-async.rs:24:9
    |
 LL |     async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
    |                                           ----     ----
@@ -19,7 +19,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-self-async.rs:23:9
+  --> $DIR/ref-mut-self-async.rs:30:9
    |
 LL |     async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
    |                                                    ----     ----
@@ -29,7 +29,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-self-async.rs:27:9
+  --> $DIR/ref-mut-self-async.rs:36:9
    |
 LL |     async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
    |                                                    ----     ----
@@ -39,7 +39,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-self-async.rs:31:9
+  --> $DIR/ref-mut-self-async.rs:42:9
    |
 LL |     async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
    |                                                             ----     ----
@@ -49,7 +49,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-self-async.rs:35:9
+  --> $DIR/ref-mut-self-async.rs:48:9
    |
 LL |     async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
    |                                                             ----     ----
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 19496a5ef6d..cdd464039cd 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
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-self-async.rs:13:9
+  --> $DIR/ref-mut-self-async.rs:16:9
    |
 LL |     async fn ref_self(&mut self, f: &u32) -> &u32 {
    |                       -             - let's call the lifetime of this reference `'1`
@@ -9,7 +9,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-self-async.rs:19:9
+  --> $DIR/ref-mut-self-async.rs:24:9
    |
 LL |     async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
    |                             -             - let's call the lifetime of this reference `'1`
@@ -19,7 +19,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-self-async.rs:23:9
+  --> $DIR/ref-mut-self-async.rs:30:9
    |
 LL |     async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
    |                                     -              - let's call the lifetime of this reference `'1`
@@ -29,7 +29,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-self-async.rs:27:9
+  --> $DIR/ref-mut-self-async.rs:36:9
    |
 LL |     async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
    |                                     -              - let's call the lifetime of this reference `'1`
@@ -39,7 +39,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-self-async.rs:31:9
+  --> $DIR/ref-mut-self-async.rs:42: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`
@@ -49,7 +49,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-self-async.rs:35:9
+  --> $DIR/ref-mut-self-async.rs:48: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`
diff --git a/src/test/ui/self/elision/ref-mut-self-async.rs b/src/test/ui/self/elision/ref-mut-self-async.rs
index 1e65605036d..59b41f364f9 100644
--- a/src/test/ui/self/elision/ref-mut-self-async.rs
+++ b/src/test/ui/self/elision/ref-mut-self-async.rs
@@ -1,4 +1,7 @@
 // edition:2018
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
 
 #![allow(non_snake_case)]
 
@@ -10,29 +13,41 @@ impl Struct {
     // Test using `&mut self` sugar:
 
     async fn ref_self(&mut self, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     // Test using `&mut Self` explicitly:
 
     async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 }
 
diff --git a/src/test/ui/self/elision/ref-mut-self.stderr b/src/test/ui/self/elision/ref-mut-self.base.stderr
index 416719a08e0..fceddddf20e 100644
--- a/src/test/ui/self/elision/ref-mut-self.stderr
+++ b/src/test/ui/self/elision/ref-mut-self.base.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-self.rs:11:9
+  --> $DIR/ref-mut-self.rs:15:9
    |
 LL |     fn ref_self(&mut self, f: &u32) -> &u32 {
    |                               ----     ----
@@ -15,7 +15,7 @@ LL |     fn ref_self<'a>(&'a mut self, f: &'a u32) -> &u32 {
    |                ++++  ++               ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-self.rs:17:9
+  --> $DIR/ref-mut-self.rs:23:9
    |
 LL |     fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
    |                                     ----     ----
@@ -31,7 +31,7 @@ LL |     fn ref_Self<'a>(self: &'a mut Self, f: &'a u32) -> &u32 {
    |                ++++        ++               ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-self.rs:21:9
+  --> $DIR/ref-mut-self.rs:29:9
    |
 LL |     fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
    |                                              ----     ----
@@ -47,7 +47,7 @@ LL |     fn box_ref_Self<'a>(self: Box<&'a mut Self>, f: &'a u32) -> &u32 {
    |                    ++++            ++                ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-self.rs:25:9
+  --> $DIR/ref-mut-self.rs:35:9
    |
 LL |     fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
    |                                              ----     ----
@@ -63,7 +63,7 @@ LL |     fn pin_ref_Self<'a>(self: Pin<&'a mut Self>, f: &'a u32) -> &u32 {
    |                    ++++            ++                ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-self.rs:29:9
+  --> $DIR/ref-mut-self.rs:41:9
    |
 LL |     fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
    |                                                       ----     ----
@@ -79,7 +79,7 @@ LL |     fn box_box_ref_Self<'a>(self: Box<Box<&'a mut Self>>, f: &'a u32) -> &u
    |                        ++++                ++                 ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-self.rs:33:9
+  --> $DIR/ref-mut-self.rs:47:9
    |
 LL |     fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
    |                                                       ----     ----
diff --git a/src/test/ui/self/elision/ref-mut-self.nll.stderr b/src/test/ui/self/elision/ref-mut-self.nll.stderr
index 94bfc5f4a81..f1f4d341b2b 100644
--- a/src/test/ui/self/elision/ref-mut-self.nll.stderr
+++ b/src/test/ui/self/elision/ref-mut-self.nll.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-self.rs:11:9
+  --> $DIR/ref-mut-self.rs:15:9
    |
 LL |     fn ref_self(&mut self, f: &u32) -> &u32 {
    |                 -             - let's call the lifetime of this reference `'1`
@@ -9,7 +9,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-self.rs:17:9
+  --> $DIR/ref-mut-self.rs:23:9
    |
 LL |     fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
    |                       -             - let's call the lifetime of this reference `'1`
@@ -19,7 +19,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-self.rs:21:9
+  --> $DIR/ref-mut-self.rs:29:9
    |
 LL |     fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
    |                               -              - let's call the lifetime of this reference `'1`
@@ -29,7 +29,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-self.rs:25:9
+  --> $DIR/ref-mut-self.rs:35:9
    |
 LL |     fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
    |                               -              - let's call the lifetime of this reference `'1`
@@ -39,7 +39,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-self.rs:29:9
+  --> $DIR/ref-mut-self.rs:41:9
    |
 LL |     fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
    |                                       -               - let's call the lifetime of this reference `'1`
@@ -49,7 +49,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-self.rs:33:9
+  --> $DIR/ref-mut-self.rs:47:9
    |
 LL |     fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
    |                                       -               - let's call the lifetime of this reference `'1`
diff --git a/src/test/ui/self/elision/ref-mut-self.rs b/src/test/ui/self/elision/ref-mut-self.rs
index 8d9359dbd94..81bd279129d 100644
--- a/src/test/ui/self/elision/ref-mut-self.rs
+++ b/src/test/ui/self/elision/ref-mut-self.rs
@@ -1,3 +1,7 @@
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
+
 #![allow(non_snake_case)]
 
 use std::pin::Pin;
@@ -8,29 +12,41 @@ impl Struct {
     // Test using `&mut self` sugar:
 
     fn ref_self(&mut self, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     // Test using `&mut Self` explicitly:
 
     fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 }
 
diff --git a/src/test/ui/self/elision/ref-mut-struct-async.stderr b/src/test/ui/self/elision/ref-mut-struct-async.base.stderr
index 61034ae4d47..0de11c24875 100644
--- a/src/test/ui/self/elision/ref-mut-struct-async.stderr
+++ b/src/test/ui/self/elision/ref-mut-struct-async.base.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-struct-async.rs:13:9
+  --> $DIR/ref-mut-struct-async.rs:16:9
    |
 LL |     async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
    |                                               ----     ----
@@ -9,7 +9,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-struct-async.rs:17:9
+  --> $DIR/ref-mut-struct-async.rs:22:9
    |
 LL |     async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
    |                                                        ----     ----
@@ -19,7 +19,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-struct-async.rs:21:9
+  --> $DIR/ref-mut-struct-async.rs:28:9
    |
 LL |     async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
    |                                                        ----     ----
@@ -29,7 +29,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-struct-async.rs:25:9
+  --> $DIR/ref-mut-struct-async.rs:34:9
    |
 LL |     async fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
    |                                                                 ----     ----
@@ -39,7 +39,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-struct-async.rs:29:9
+  --> $DIR/ref-mut-struct-async.rs:40:9
    |
 LL |     async fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
    |                                                                 ----     ----
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 94671c7c87a..0ef410c8df1 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
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-struct-async.rs:13:9
+  --> $DIR/ref-mut-struct-async.rs:16:9
    |
 LL |     async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
    |                               -               - let's call the lifetime of this reference `'1`
@@ -9,7 +9,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-struct-async.rs:17:9
+  --> $DIR/ref-mut-struct-async.rs:22:9
    |
 LL |     async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
    |                                       -                - let's call the lifetime of this reference `'1`
@@ -19,7 +19,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-struct-async.rs:21:9
+  --> $DIR/ref-mut-struct-async.rs:28:9
    |
 LL |     async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
    |                                       -                - let's call the lifetime of this reference `'1`
@@ -29,7 +29,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-struct-async.rs:25:9
+  --> $DIR/ref-mut-struct-async.rs:34: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`
@@ -39,7 +39,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-struct-async.rs:29:9
+  --> $DIR/ref-mut-struct-async.rs:40: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`
diff --git a/src/test/ui/self/elision/ref-mut-struct-async.rs b/src/test/ui/self/elision/ref-mut-struct-async.rs
index 990f485907f..7448988355c 100644
--- a/src/test/ui/self/elision/ref-mut-struct-async.rs
+++ b/src/test/ui/self/elision/ref-mut-struct-async.rs
@@ -1,4 +1,7 @@
 // edition:2018
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
 
 #![allow(non_snake_case)]
 
@@ -10,23 +13,33 @@ impl Struct {
     // Test using `&mut Struct` explicitly:
 
     async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 }
 
diff --git a/src/test/ui/self/elision/ref-mut-struct.stderr b/src/test/ui/self/elision/ref-mut-struct.base.stderr
index 6ca9ab1b2c7..a01492f6cd3 100644
--- a/src/test/ui/self/elision/ref-mut-struct.stderr
+++ b/src/test/ui/self/elision/ref-mut-struct.base.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-struct.rs:11:9
+  --> $DIR/ref-mut-struct.rs:15:9
    |
 LL |     fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
    |                                         ----     ----
@@ -15,7 +15,7 @@ LL |     fn ref_Struct<'a>(self: &'a mut Struct, f: &'a u32) -> &u32 {
    |                  ++++        ++                 ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-struct.rs:15:9
+  --> $DIR/ref-mut-struct.rs:21:9
    |
 LL |     fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
    |                                                  ----     ----
@@ -31,7 +31,7 @@ LL |     fn box_ref_Struct<'a>(self: Box<&'a mut Struct>, f: &'a u32) -> &u32 {
    |                      ++++            ++                  ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-struct.rs:19:9
+  --> $DIR/ref-mut-struct.rs:27:9
    |
 LL |     fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
    |                                                  ----     ----
@@ -47,7 +47,7 @@ LL |     fn pin_ref_Struct<'a>(self: Pin<&'a mut Struct>, f: &'a u32) -> &u32 {
    |                      ++++            ++                  ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-struct.rs:23:9
+  --> $DIR/ref-mut-struct.rs:33:9
    |
 LL |     fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
    |                                                           ----     ----
@@ -63,7 +63,7 @@ LL |     fn box_box_ref_Struct<'a>(self: Box<Box<&'a mut Struct>>, f: &'a u32) -
    |                          ++++                ++                   ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-mut-struct.rs:27:9
+  --> $DIR/ref-mut-struct.rs:39:9
    |
 LL |     fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
    |                                                           ----     ----
diff --git a/src/test/ui/self/elision/ref-mut-struct.nll.stderr b/src/test/ui/self/elision/ref-mut-struct.nll.stderr
index c9e7479ea5d..de7eb02d7a7 100644
--- a/src/test/ui/self/elision/ref-mut-struct.nll.stderr
+++ b/src/test/ui/self/elision/ref-mut-struct.nll.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-struct.rs:11:9
+  --> $DIR/ref-mut-struct.rs:15:9
    |
 LL |     fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
    |                         -               - let's call the lifetime of this reference `'1`
@@ -9,7 +9,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-struct.rs:15:9
+  --> $DIR/ref-mut-struct.rs:21:9
    |
 LL |     fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
    |                                 -                - let's call the lifetime of this reference `'1`
@@ -19,7 +19,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-struct.rs:19:9
+  --> $DIR/ref-mut-struct.rs:27:9
    |
 LL |     fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
    |                                 -                - let's call the lifetime of this reference `'1`
@@ -29,7 +29,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-struct.rs:23:9
+  --> $DIR/ref-mut-struct.rs:33:9
    |
 LL |     fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
    |                                         -                 - let's call the lifetime of this reference `'1`
@@ -39,7 +39,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-mut-struct.rs:27:9
+  --> $DIR/ref-mut-struct.rs:39:9
    |
 LL |     fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
    |                                         -                 - let's call the lifetime of this reference `'1`
diff --git a/src/test/ui/self/elision/ref-mut-struct.rs b/src/test/ui/self/elision/ref-mut-struct.rs
index 05e275b19e4..72674bd65b6 100644
--- a/src/test/ui/self/elision/ref-mut-struct.rs
+++ b/src/test/ui/self/elision/ref-mut-struct.rs
@@ -1,3 +1,7 @@
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
+
 #![allow(non_snake_case)]
 
 use std::pin::Pin;
@@ -8,23 +12,33 @@ impl Struct {
     // Test using `&mut Struct` explicitly:
 
     fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 }
 
diff --git a/src/test/ui/self/elision/ref-self-async.stderr b/src/test/ui/self/elision/ref-self-async.base.stderr
index 0eab16e685d..fa13b69bb21 100644
--- a/src/test/ui/self/elision/ref-self-async.stderr
+++ b/src/test/ui/self/elision/ref-self-async.base.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self-async.rs:23:9
+  --> $DIR/ref-self-async.rs:26:9
    |
 LL |     async fn ref_self(&self, f: &u32) -> &u32 {
    |                                 ----     ----
@@ -9,7 +9,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self-async.rs:29:9
+  --> $DIR/ref-self-async.rs:34:9
    |
 LL |     async fn ref_Self(self: &Self, f: &u32) -> &u32 {
    |                                       ----     ----
@@ -19,7 +19,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self-async.rs:33:9
+  --> $DIR/ref-self-async.rs:40:9
    |
 LL |     async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
    |                                                ----     ----
@@ -29,7 +29,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self-async.rs:37:9
+  --> $DIR/ref-self-async.rs:46:9
    |
 LL |     async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
    |                                                ----     ----
@@ -39,7 +39,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self-async.rs:41:9
+  --> $DIR/ref-self-async.rs:52:9
    |
 LL |     async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
    |                                                         ----     ----
@@ -49,7 +49,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self-async.rs:45:9
+  --> $DIR/ref-self-async.rs:58:9
    |
 LL |     async fn box_pin_ref_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
    |                                                         ----     ----
@@ -59,7 +59,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self-async.rs:49:9
+  --> $DIR/ref-self-async.rs:64:9
    |
 LL |     async fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 {
    |                                                             ---     ---
diff --git a/src/test/ui/self/elision/ref-self-async.nll.stderr b/src/test/ui/self/elision/ref-self-async.nll.stderr
index bd1f80811b5..77faaa86650 100644
--- a/src/test/ui/self/elision/ref-self-async.nll.stderr
+++ b/src/test/ui/self/elision/ref-self-async.nll.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/ref-self-async.rs:23:9
+  --> $DIR/ref-self-async.rs:26:9
    |
 LL |     async fn ref_self(&self, f: &u32) -> &u32 {
    |                       -         - let's call the lifetime of this reference `'1`
@@ -9,7 +9,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-self-async.rs:29:9
+  --> $DIR/ref-self-async.rs:34:9
    |
 LL |     async fn ref_Self(self: &Self, f: &u32) -> &u32 {
    |                             -         - let's call the lifetime of this reference `'1`
@@ -19,7 +19,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-self-async.rs:33:9
+  --> $DIR/ref-self-async.rs:40:9
    |
 LL |     async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
    |                                     -          - let's call the lifetime of this reference `'1`
@@ -29,7 +29,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-self-async.rs:37:9
+  --> $DIR/ref-self-async.rs:46:9
    |
 LL |     async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
    |                                     -          - let's call the lifetime of this reference `'1`
@@ -39,7 +39,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-self-async.rs:41:9
+  --> $DIR/ref-self-async.rs:52:9
    |
 LL |     async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
    |                                             -           - let's call the lifetime of this reference `'1`
@@ -49,7 +49,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-self-async.rs:45:9
+  --> $DIR/ref-self-async.rs:58:9
    |
 LL |     async fn box_pin_ref_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
    |                                             -           - let's call the lifetime of this reference `'1`
@@ -59,7 +59,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-self-async.rs:49:9
+  --> $DIR/ref-self-async.rs:64:9
    |
 LL |     async fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 {
    |                                            -                - let's call the lifetime of this reference `'1`
diff --git a/src/test/ui/self/elision/ref-self-async.rs b/src/test/ui/self/elision/ref-self-async.rs
index 0fbbd95c975..afe5fe100e3 100644
--- a/src/test/ui/self/elision/ref-self-async.rs
+++ b/src/test/ui/self/elision/ref-self-async.rs
@@ -1,4 +1,7 @@
 // edition:2018
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
 
 #![allow(non_snake_case)]
 #![feature(arbitrary_self_types)]
@@ -20,33 +23,47 @@ impl Struct {
     // Test using `&self` sugar:
 
     async fn ref_self(&self, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     // Test using `&Self` explicitly:
 
     async fn ref_Self(self: &Self, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_pin_ref_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 }
 
diff --git a/src/test/ui/self/elision/ref-self.stderr b/src/test/ui/self/elision/ref-self.base.stderr
index 955222f7655..8bd194d701f 100644
--- a/src/test/ui/self/elision/ref-self.stderr
+++ b/src/test/ui/self/elision/ref-self.base.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self.rs:21:9
+  --> $DIR/ref-self.rs:25:9
    |
 LL |     fn ref_self(&self, f: &u32) -> &u32 {
    |                           ----     ----
@@ -15,7 +15,7 @@ LL |     fn ref_self<'a>(&'a self, f: &'a u32) -> &u32 {
    |                ++++  ++           ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self.rs:27:9
+  --> $DIR/ref-self.rs:33:9
    |
 LL |     fn ref_Self(self: &Self, f: &u32) -> &u32 {
    |                                 ----     ----
@@ -31,7 +31,7 @@ LL |     fn ref_Self<'a>(self: &'a Self, f: &'a u32) -> &u32 {
    |                ++++        ++           ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self.rs:31:9
+  --> $DIR/ref-self.rs:39:9
    |
 LL |     fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
    |                                          ----     ----
@@ -47,7 +47,7 @@ LL |     fn box_ref_Self<'a>(self: Box<&'a Self>, f: &'a u32) -> &u32 {
    |                    ++++            ++            ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self.rs:35:9
+  --> $DIR/ref-self.rs:45:9
    |
 LL |     fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
    |                                          ----     ----
@@ -63,7 +63,7 @@ LL |     fn pin_ref_Self<'a>(self: Pin<&'a Self>, f: &'a u32) -> &u32 {
    |                    ++++            ++            ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self.rs:39:9
+  --> $DIR/ref-self.rs:51:9
    |
 LL |     fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
    |                                                   ----     ----
@@ -79,7 +79,7 @@ LL |     fn box_box_ref_Self<'a>(self: Box<Box<&'a Self>>, f: &'a u32) -> &u32 {
    |                        ++++                ++             ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self.rs:43:9
+  --> $DIR/ref-self.rs:57:9
    |
 LL |     fn box_pin_ref_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
    |                                                   ----     ----
@@ -95,7 +95,7 @@ LL |     fn box_pin_ref_Self<'a>(self: Box<Pin<&'a Self>>, f: &'a u32) -> &u32 {
    |                        ++++                ++             ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-self.rs:47:9
+  --> $DIR/ref-self.rs:63:9
    |
 LL |     fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 {
    |                                                       ---     ---
diff --git a/src/test/ui/self/elision/ref-self.nll.stderr b/src/test/ui/self/elision/ref-self.nll.stderr
index d1fd209102e..f2b7b0ad019 100644
--- a/src/test/ui/self/elision/ref-self.nll.stderr
+++ b/src/test/ui/self/elision/ref-self.nll.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/ref-self.rs:21:9
+  --> $DIR/ref-self.rs:25:9
    |
 LL |     fn ref_self(&self, f: &u32) -> &u32 {
    |                 -         - let's call the lifetime of this reference `'1`
@@ -9,7 +9,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-self.rs:27:9
+  --> $DIR/ref-self.rs:33:9
    |
 LL |     fn ref_Self(self: &Self, f: &u32) -> &u32 {
    |                       -         - let's call the lifetime of this reference `'1`
@@ -19,7 +19,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-self.rs:31:9
+  --> $DIR/ref-self.rs:39:9
    |
 LL |     fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
    |                               -          - let's call the lifetime of this reference `'1`
@@ -29,7 +29,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-self.rs:35:9
+  --> $DIR/ref-self.rs:45:9
    |
 LL |     fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
    |                               -          - let's call the lifetime of this reference `'1`
@@ -39,7 +39,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-self.rs:39:9
+  --> $DIR/ref-self.rs:51:9
    |
 LL |     fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
    |                                       -           - let's call the lifetime of this reference `'1`
@@ -49,7 +49,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-self.rs:43:9
+  --> $DIR/ref-self.rs:57:9
    |
 LL |     fn box_pin_ref_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
    |                                       -           - let's call the lifetime of this reference `'1`
@@ -59,7 +59,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-self.rs:47:9
+  --> $DIR/ref-self.rs:63:9
    |
 LL |     fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 {
    |                                      -                - let's call the lifetime of this reference `'1`
diff --git a/src/test/ui/self/elision/ref-self.rs b/src/test/ui/self/elision/ref-self.rs
index e389d8518ad..34df3da4505 100644
--- a/src/test/ui/self/elision/ref-self.rs
+++ b/src/test/ui/self/elision/ref-self.rs
@@ -1,3 +1,7 @@
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
+
 #![feature(arbitrary_self_types)]
 #![allow(non_snake_case)]
 
@@ -18,33 +22,47 @@ impl Struct {
     // Test using `&self` sugar:
 
     fn ref_self(&self, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     // Test using `&Self` explicitly:
 
     fn ref_Self(self: &Self, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_pin_ref_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 }
 
diff --git a/src/test/ui/self/elision/ref-struct-async.stderr b/src/test/ui/self/elision/ref-struct-async.base.stderr
index aa1d7453e83..8da673d4435 100644
--- a/src/test/ui/self/elision/ref-struct-async.stderr
+++ b/src/test/ui/self/elision/ref-struct-async.base.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-struct-async.rs:13:9
+  --> $DIR/ref-struct-async.rs:16:9
    |
 LL |     async fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
    |                                           ----     ----
@@ -9,7 +9,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-struct-async.rs:17:9
+  --> $DIR/ref-struct-async.rs:22:9
    |
 LL |     async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
    |                                                    ----     ----
@@ -19,7 +19,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-struct-async.rs:21:9
+  --> $DIR/ref-struct-async.rs:28:9
    |
 LL |     async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
    |                                                    ----     ----
@@ -29,7 +29,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-struct-async.rs:25:9
+  --> $DIR/ref-struct-async.rs:34:9
    |
 LL |     async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
    |                                                             ----     ----
@@ -39,7 +39,7 @@ LL |         f
    |         ^ ...but data from `f` is returned here
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-struct-async.rs:29:9
+  --> $DIR/ref-struct-async.rs:40:9
    |
 LL |     async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
    |                                                         ----     ----
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 9361b6f3f81..ad07c70df87 100644
--- a/src/test/ui/self/elision/ref-struct-async.nll.stderr
+++ b/src/test/ui/self/elision/ref-struct-async.nll.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/ref-struct-async.rs:13:9
+  --> $DIR/ref-struct-async.rs:16:9
    |
 LL |     async fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
    |                               -           - let's call the lifetime of this reference `'1`
@@ -9,7 +9,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-struct-async.rs:17:9
+  --> $DIR/ref-struct-async.rs:22:9
    |
 LL |     async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
    |                                       -            - let's call the lifetime of this reference `'1`
@@ -19,7 +19,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-struct-async.rs:21:9
+  --> $DIR/ref-struct-async.rs:28:9
    |
 LL |     async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
    |                                       -            - let's call the lifetime of this reference `'1`
@@ -29,7 +29,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-struct-async.rs:25:9
+  --> $DIR/ref-struct-async.rs:34:9
    |
 LL |     async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
    |                                               -             - let's call the lifetime of this reference `'1`
@@ -39,7 +39,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-struct-async.rs:29:9
+  --> $DIR/ref-struct-async.rs:40:9
    |
 LL |     async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
    |                                           -             - let's call the lifetime of this reference `'1`
diff --git a/src/test/ui/self/elision/ref-struct-async.rs b/src/test/ui/self/elision/ref-struct-async.rs
index e6bd5418c8d..12f8f6faf1b 100644
--- a/src/test/ui/self/elision/ref-struct-async.rs
+++ b/src/test/ui/self/elision/ref-struct-async.rs
@@ -1,4 +1,7 @@
 // edition:2018
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
 
 #![allow(non_snake_case)]
 
@@ -10,23 +13,33 @@ impl Struct {
     // Test using `&Struct` explicitly:
 
     async fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 }
 
diff --git a/src/test/ui/self/elision/ref-struct.stderr b/src/test/ui/self/elision/ref-struct.base.stderr
index c80993fe8c4..5650b3788e7 100644
--- a/src/test/ui/self/elision/ref-struct.stderr
+++ b/src/test/ui/self/elision/ref-struct.base.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-struct.rs:11:9
+  --> $DIR/ref-struct.rs:15:9
    |
 LL |     fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
    |                                     ----     ----
@@ -15,7 +15,7 @@ LL |     fn ref_Struct<'a>(self: &'a Struct, f: &'a u32) -> &u32 {
    |                  ++++        ++             ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-struct.rs:15:9
+  --> $DIR/ref-struct.rs:21:9
    |
 LL |     fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
    |                                              ----     ----
@@ -31,7 +31,7 @@ LL |     fn box_ref_Struct<'a>(self: Box<&'a Struct>, f: &'a u32) -> &u32 {
    |                      ++++            ++              ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-struct.rs:19:9
+  --> $DIR/ref-struct.rs:27:9
    |
 LL |     fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
    |                                              ----     ----
@@ -47,7 +47,7 @@ LL |     fn pin_ref_Struct<'a>(self: Pin<&'a Struct>, f: &'a u32) -> &u32 {
    |                      ++++            ++              ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-struct.rs:23:9
+  --> $DIR/ref-struct.rs:33:9
    |
 LL |     fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
    |                                                       ----     ----
@@ -63,7 +63,7 @@ LL |     fn box_box_ref_Struct<'a>(self: Box<Box<&'a Struct>>, f: &'a u32) -> &u
    |                          ++++                ++               ++
 
 error[E0623]: lifetime mismatch
-  --> $DIR/ref-struct.rs:27:9
+  --> $DIR/ref-struct.rs:39:9
    |
 LL |     fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
    |                                                   ----     ----
diff --git a/src/test/ui/self/elision/ref-struct.nll.stderr b/src/test/ui/self/elision/ref-struct.nll.stderr
index e1cc38b7c95..70453b0ddfc 100644
--- a/src/test/ui/self/elision/ref-struct.nll.stderr
+++ b/src/test/ui/self/elision/ref-struct.nll.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/ref-struct.rs:11:9
+  --> $DIR/ref-struct.rs:15:9
    |
 LL |     fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
    |                         -           - let's call the lifetime of this reference `'1`
@@ -9,7 +9,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-struct.rs:15:9
+  --> $DIR/ref-struct.rs:21:9
    |
 LL |     fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
    |                                 -            - let's call the lifetime of this reference `'1`
@@ -19,7 +19,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-struct.rs:19:9
+  --> $DIR/ref-struct.rs:27:9
    |
 LL |     fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
    |                                 -            - let's call the lifetime of this reference `'1`
@@ -29,7 +29,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-struct.rs:23:9
+  --> $DIR/ref-struct.rs:33:9
    |
 LL |     fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
    |                                         -             - let's call the lifetime of this reference `'1`
@@ -39,7 +39,7 @@ LL |         f
    |         ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
 
 error: lifetime may not live long enough
-  --> $DIR/ref-struct.rs:27:9
+  --> $DIR/ref-struct.rs:39:9
    |
 LL |     fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
    |                                     -             - let's call the lifetime of this reference `'1`
diff --git a/src/test/ui/self/elision/ref-struct.rs b/src/test/ui/self/elision/ref-struct.rs
index 73711a7feea..0ffe72793d7 100644
--- a/src/test/ui/self/elision/ref-struct.rs
+++ b/src/test/ui/self/elision/ref-struct.rs
@@ -1,3 +1,7 @@
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
+
 #![allow(non_snake_case)]
 
 use std::pin::Pin;
@@ -8,23 +12,33 @@ impl Struct {
     // Test using `&Struct` explicitly:
 
     fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 
     fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
-        f //~ ERROR lifetime mismatch
+        f
+        //[base]~^ ERROR lifetime mismatch
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 }