about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2018-09-27 22:30:04 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2018-09-27 22:30:04 +0100
commit27ea8117e74ac9a781d33945ff210fc38142e5ea (patch)
tree487f879338e551151dc3cde3314aa83b09df1b90
parentc9865b1c37f8cb8a257591e6ea0b32a5df1f3d41 (diff)
downloadrust-27ea8117e74ac9a781d33945ff210fc38142e5ea.tar.gz
rust-27ea8117e74ac9a781d33945ff210fc38142e5ea.zip
Enable NLL compare mode for more tests
These tests were disabled due to NLL bugs that have since been fixed.
-rw-r--r--src/test/ui/borrowck/borrowck-lend-flow-if.nll.stderr14
-rw-r--r--src/test/ui/borrowck/borrowck-lend-flow-if.rs13
-rw-r--r--src/test/ui/borrowck/borrowck-lend-flow-if.stderr3
-rw-r--r--src/test/ui/borrowck/borrowck-lend-flow.nll.stderr13
-rw-r--r--src/test/ui/borrowck/borrowck-lend-flow.rs6
-rw-r--r--src/test/ui/borrowck/borrowck-lend-flow.stderr3
-rw-r--r--src/test/ui/closure_promotion.rs3
-rw-r--r--src/test/ui/closure_promotion.stderr2
-rw-r--r--src/test/ui/regions/regions-bounded-by-trait-requiring-static.nll.stderr50
-rw-r--r--src/test/ui/regions/regions-bounded-by-trait-requiring-static.rs2
-rw-r--r--src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr12
-rw-r--r--src/test/ui/regions/regions-bounded-method-type-parameters.nll.stderr19
-rw-r--r--src/test/ui/regions/regions-bounded-method-type-parameters.rs2
-rw-r--r--src/test/ui/regions/regions-bounded-method-type-parameters.stderr2
-rw-r--r--src/test/ui/regions/regions-infer-contravariance-due-to-decl.nll.stderr13
-rw-r--r--src/test/ui/regions/regions-infer-contravariance-due-to-decl.rs2
-rw-r--r--src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr2
-rw-r--r--src/test/ui/regions/regions-infer-covariance-due-to-decl.nll.stderr13
-rw-r--r--src/test/ui/regions/regions-infer-covariance-due-to-decl.rs2
-rw-r--r--src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr2
-rw-r--r--src/test/ui/regions/regions-outlives-projection-container.rs2
-rw-r--r--src/test/ui/regions/regions-outlives-projection-container.stderr40
-rw-r--r--src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.nll.stderr13
-rw-r--r--src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.rs2
-rw-r--r--src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr2
-rw-r--r--src/test/ui/regions/regions-variance-contravariant-use-covariant.nll.stderr13
-rw-r--r--src/test/ui/regions/regions-variance-contravariant-use-covariant.rs2
-rw-r--r--src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr2
-rw-r--r--src/test/ui/regions/regions-variance-covariant-use-contravariant.nll.stderr13
-rw-r--r--src/test/ui/regions/regions-variance-covariant-use-contravariant.rs2
-rw-r--r--src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr2
-rw-r--r--src/test/ui/regions/regions-variance-invariant-use-contravariant.nll.stderr13
-rw-r--r--src/test/ui/regions/regions-variance-invariant-use-contravariant.rs2
-rw-r--r--src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr2
-rw-r--r--src/test/ui/regions/regions-variance-invariant-use-covariant.nll.stderr11
-rw-r--r--src/test/ui/regions/regions-variance-invariant-use-covariant.rs2
-rw-r--r--src/test/ui/regions/regions-variance-invariant-use-covariant.stderr6
-rw-r--r--src/test/ui/variance/variance-cell-is-invariant.nll.stderr13
-rw-r--r--src/test/ui/variance/variance-cell-is-invariant.rs2
-rw-r--r--src/test/ui/variance/variance-cell-is-invariant.stderr2
-rw-r--r--src/test/ui/variance/variance-contravariant-arg-trait-match.nll.stderr24
-rw-r--r--src/test/ui/variance/variance-contravariant-arg-trait-match.rs2
-rw-r--r--src/test/ui/variance/variance-contravariant-arg-trait-match.stderr20
-rw-r--r--src/test/ui/variance/variance-contravariant-self-trait-match.nll.stderr24
-rw-r--r--src/test/ui/variance/variance-contravariant-self-trait-match.rs2
-rw-r--r--src/test/ui/variance/variance-contravariant-self-trait-match.stderr20
-rw-r--r--src/test/ui/variance/variance-covariant-arg-trait-match.nll.stderr24
-rw-r--r--src/test/ui/variance/variance-covariant-arg-trait-match.rs2
-rw-r--r--src/test/ui/variance/variance-covariant-arg-trait-match.stderr20
-rw-r--r--src/test/ui/variance/variance-covariant-self-trait-match.nll.stderr24
-rw-r--r--src/test/ui/variance/variance-covariant-self-trait-match.rs2
-rw-r--r--src/test/ui/variance/variance-covariant-self-trait-match.stderr20
-rw-r--r--src/test/ui/variance/variance-invariant-arg-trait-match.nll.stderr24
-rw-r--r--src/test/ui/variance/variance-invariant-arg-trait-match.rs2
-rw-r--r--src/test/ui/variance/variance-invariant-arg-trait-match.stderr20
-rw-r--r--src/test/ui/variance/variance-invariant-self-trait-match.nll.stderr24
-rw-r--r--src/test/ui/variance/variance-invariant-self-trait-match.rs2
-rw-r--r--src/test/ui/variance/variance-invariant-self-trait-match.stderr20
58 files changed, 458 insertions, 142 deletions
diff --git a/src/test/ui/borrowck/borrowck-lend-flow-if.nll.stderr b/src/test/ui/borrowck/borrowck-lend-flow-if.nll.stderr
new file mode 100644
index 00000000000..0f0eed4a051
--- /dev/null
+++ b/src/test/ui/borrowck/borrowck-lend-flow-if.nll.stderr
@@ -0,0 +1,14 @@
+error[E0502]: cannot borrow `*v` as mutable because it is also borrowed as immutable
+  --> $DIR/borrowck-lend-flow-if.rs:39:16
+   |
+LL |         _w = &v;
+   |              -- immutable borrow occurs here
+LL |     }
+LL |     borrow_mut(&mut *v); //~ ERROR cannot borrow
+   |                ^^^^^^^ mutable borrow occurs here
+LL |     _w.use_ref();
+   |     -- borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0502`.
diff --git a/src/test/ui/borrowck/borrowck-lend-flow-if.rs b/src/test/ui/borrowck/borrowck-lend-flow-if.rs
index 3df174b4fb8..8e6ac345979 100644
--- a/src/test/ui/borrowck/borrowck-lend-flow-if.rs
+++ b/src/test/ui/borrowck/borrowck-lend-flow-if.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 // Note: the borrowck analysis is currently flow-insensitive.
 // Therefore, some of these errors are marked as spurious and could be
 // corrected by a simple change to the analysis.  The others are
@@ -32,25 +30,32 @@ fn pre_freeze_cond() {
     // In this instance, the freeze is conditional and starts before
     // the mut borrow.
 
+    let u = box 0;
     let mut v: Box<_> = box 3;
-    let _w;
+    let mut _w = &u;
     if cond() {
         _w = &v;
     }
     borrow_mut(&mut *v); //~ ERROR cannot borrow
+    _w.use_ref();
 }
 
 fn pre_freeze_else() {
     // In this instance, the freeze and mut borrow are on separate sides
     // of the if.
 
+    let u = box 0;
     let mut v: Box<_> = box 3;
-    let _w;
+    let mut _w = &u;
     if cond() {
         _w = &v;
     } else {
         borrow_mut(&mut *v);
     }
+    _w.use_ref();
 }
 
 fn main() {}
+
+trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { }  }
+impl<T> Fake for T { }
diff --git a/src/test/ui/borrowck/borrowck-lend-flow-if.stderr b/src/test/ui/borrowck/borrowck-lend-flow-if.stderr
index c53c4e46d4f..091f74416c9 100644
--- a/src/test/ui/borrowck/borrowck-lend-flow-if.stderr
+++ b/src/test/ui/borrowck/borrowck-lend-flow-if.stderr
@@ -1,11 +1,12 @@
 error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immutable
-  --> $DIR/borrowck-lend-flow-if.rs:40:21
+  --> $DIR/borrowck-lend-flow-if.rs:39:21
    |
 LL |         _w = &v;
    |               - immutable borrow occurs here
 LL |     }
 LL |     borrow_mut(&mut *v); //~ ERROR cannot borrow
    |                     ^^ mutable borrow occurs here
+LL |     _w.use_ref();
 LL | }
    | - immutable borrow ends here
 
diff --git a/src/test/ui/borrowck/borrowck-lend-flow.nll.stderr b/src/test/ui/borrowck/borrowck-lend-flow.nll.stderr
new file mode 100644
index 00000000000..7ebc2ce47cd
--- /dev/null
+++ b/src/test/ui/borrowck/borrowck-lend-flow.nll.stderr
@@ -0,0 +1,13 @@
+error[E0502]: cannot borrow `*v` as mutable because it is also borrowed as immutable
+  --> $DIR/borrowck-lend-flow.rs:34:16
+   |
+LL |     let _w = &v;
+   |              -- immutable borrow occurs here
+LL |     borrow_mut(&mut *v); //~ ERROR cannot borrow
+   |                ^^^^^^^ mutable borrow occurs here
+LL |     _w.use_ref();
+   |     -- borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0502`.
diff --git a/src/test/ui/borrowck/borrowck-lend-flow.rs b/src/test/ui/borrowck/borrowck-lend-flow.rs
index 27a21f0e40a..b50a97cf3c3 100644
--- a/src/test/ui/borrowck/borrowck-lend-flow.rs
+++ b/src/test/ui/borrowck/borrowck-lend-flow.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 // Note: the borrowck analysis is currently flow-insensitive.
 // Therefore, some of these errors are marked as spurious and could be
 // corrected by a simple change to the analysis.  The others are
@@ -34,6 +32,7 @@ fn pre_freeze() {
     let mut v: Box<_> = box 3;
     let _w = &v;
     borrow_mut(&mut *v); //~ ERROR cannot borrow
+    _w.use_ref();
 }
 
 fn post_freeze() {
@@ -45,3 +44,6 @@ fn post_freeze() {
 }
 
 fn main() {}
+
+trait Fake { fn use_mut(&mut self) { } fn use_ref(&self) { }  }
+impl<T> Fake for T { }
diff --git a/src/test/ui/borrowck/borrowck-lend-flow.stderr b/src/test/ui/borrowck/borrowck-lend-flow.stderr
index abb83c8dfc8..0d67f97fe01 100644
--- a/src/test/ui/borrowck/borrowck-lend-flow.stderr
+++ b/src/test/ui/borrowck/borrowck-lend-flow.stderr
@@ -1,10 +1,11 @@
 error[E0502]: cannot borrow `*v` as mutable because `v` is also borrowed as immutable
-  --> $DIR/borrowck-lend-flow.rs:36:21
+  --> $DIR/borrowck-lend-flow.rs:34:21
    |
 LL |     let _w = &v;
    |               - immutable borrow occurs here
 LL |     borrow_mut(&mut *v); //~ ERROR cannot borrow
    |                     ^^ mutable borrow occurs here
+LL |     _w.use_ref();
 LL | }
    | - immutable borrow ends here
 
diff --git a/src/test/ui/closure_promotion.rs b/src/test/ui/closure_promotion.rs
index 8826661f84a..7f282c73220 100644
--- a/src/test/ui/closure_promotion.rs
+++ b/src/test/ui/closure_promotion.rs
@@ -12,8 +12,7 @@
 
 #![allow(const_err)]
 
-// nll successfully compiles this. It is a bug.
-// See https://github.com/rust-lang/rust/issues/52384
+// nll successfully compiles this.
 fn main() {
     let x: &'static _ = &|| { let z = 3; z }; //~ ERROR does not live long enough
 }
diff --git a/src/test/ui/closure_promotion.stderr b/src/test/ui/closure_promotion.stderr
index 8f08796b5c6..058c8229303 100644
--- a/src/test/ui/closure_promotion.stderr
+++ b/src/test/ui/closure_promotion.stderr
@@ -1,5 +1,5 @@
 error[E0597]: borrowed value does not live long enough
-  --> $DIR/closure_promotion.rs:18:26
+  --> $DIR/closure_promotion.rs:17:26
    |
 LL |     let x: &'static _ = &|| { let z = 3; z }; //~ ERROR does not live long enough
    |                          ^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
diff --git a/src/test/ui/regions/regions-bounded-by-trait-requiring-static.nll.stderr b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.nll.stderr
new file mode 100644
index 00000000000..654b2b91583
--- /dev/null
+++ b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.nll.stderr
@@ -0,0 +1,50 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-bounded-by-trait-requiring-static.rs:32:5
+   |
+LL | fn param_not_ok<'a>(x: &'a isize) {
+   |                 -- lifetime `'a` defined here
+LL |     assert_send::<&'a isize>(); //~ ERROR does not fulfill the required lifetime
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-bounded-by-trait-requiring-static.rs:36:5
+   |
+LL | fn param_not_ok1<'a>(_: &'a isize) {
+   |                  -- lifetime `'a` defined here
+LL |     assert_send::<&'a str>(); //~ ERROR does not fulfill the required lifetime
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-bounded-by-trait-requiring-static.rs:40:5
+   |
+LL | fn param_not_ok2<'a>(_: &'a isize) {
+   |                  -- lifetime `'a` defined here
+LL |     assert_send::<&'a [isize]>(); //~ ERROR does not fulfill the required lifetime
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-bounded-by-trait-requiring-static.rs:54:5
+   |
+LL | fn box_with_region_not_ok<'a>() {
+   |                           -- lifetime `'a` defined here
+LL |     assert_send::<Box<&'a isize>>(); //~ ERROR does not fulfill the required lifetime
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-bounded-by-trait-requiring-static.rs:65:5
+   |
+LL | fn unsafe_ok2<'a>(_: &'a isize) {
+   |               -- lifetime `'a` defined here
+LL |     assert_send::<*const &'a isize>(); //~ ERROR does not fulfill the required lifetime
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-bounded-by-trait-requiring-static.rs:69:5
+   |
+LL | fn unsafe_ok3<'a>(_: &'a isize) {
+   |               -- lifetime `'a` defined here
+LL |     assert_send::<*mut &'a isize>(); //~ ERROR does not fulfill the required lifetime
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: aborting due to 6 previous errors
+
diff --git a/src/test/ui/regions/regions-bounded-by-trait-requiring-static.rs b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.rs
index 8a15656f8a7..19c50d57e1b 100644
--- a/src/test/ui/regions/regions-bounded-by-trait-requiring-static.rs
+++ b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 // Test which of the builtin types are considered sendable. The tests
 // in this file all test region bound and lifetime violations that are
 // detected during type check.
diff --git a/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr
index 2cd82707a2a..82fa271ca4e 100644
--- a/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr
+++ b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr
@@ -1,5 +1,5 @@
 error[E0477]: the type `&'a isize` does not fulfill the required lifetime
-  --> $DIR/regions-bounded-by-trait-requiring-static.rs:34:5
+  --> $DIR/regions-bounded-by-trait-requiring-static.rs:32:5
    |
 LL |     assert_send::<&'a isize>(); //~ ERROR does not fulfill the required lifetime
    |     ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -7,7 +7,7 @@ LL |     assert_send::<&'a isize>(); //~ ERROR does not fulfill the required lif
    = note: type must satisfy the static lifetime
 
 error[E0477]: the type `&'a str` does not fulfill the required lifetime
-  --> $DIR/regions-bounded-by-trait-requiring-static.rs:38:5
+  --> $DIR/regions-bounded-by-trait-requiring-static.rs:36:5
    |
 LL |     assert_send::<&'a str>(); //~ ERROR does not fulfill the required lifetime
    |     ^^^^^^^^^^^^^^^^^^^^^^
@@ -15,7 +15,7 @@ LL |     assert_send::<&'a str>(); //~ ERROR does not fulfill the required lifet
    = note: type must satisfy the static lifetime
 
 error[E0477]: the type `&'a [isize]` does not fulfill the required lifetime
-  --> $DIR/regions-bounded-by-trait-requiring-static.rs:42:5
+  --> $DIR/regions-bounded-by-trait-requiring-static.rs:40:5
    |
 LL |     assert_send::<&'a [isize]>(); //~ ERROR does not fulfill the required lifetime
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL |     assert_send::<&'a [isize]>(); //~ ERROR does not fulfill the required l
    = note: type must satisfy the static lifetime
 
 error[E0477]: the type `std::boxed::Box<&'a isize>` does not fulfill the required lifetime
-  --> $DIR/regions-bounded-by-trait-requiring-static.rs:56:5
+  --> $DIR/regions-bounded-by-trait-requiring-static.rs:54:5
    |
 LL |     assert_send::<Box<&'a isize>>(); //~ ERROR does not fulfill the required lifetime
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -31,7 +31,7 @@ LL |     assert_send::<Box<&'a isize>>(); //~ ERROR does not fulfill the require
    = note: type must satisfy the static lifetime
 
 error[E0477]: the type `*const &'a isize` does not fulfill the required lifetime
-  --> $DIR/regions-bounded-by-trait-requiring-static.rs:67:5
+  --> $DIR/regions-bounded-by-trait-requiring-static.rs:65:5
    |
 LL |     assert_send::<*const &'a isize>(); //~ ERROR does not fulfill the required lifetime
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -39,7 +39,7 @@ LL |     assert_send::<*const &'a isize>(); //~ ERROR does not fulfill the requi
    = note: type must satisfy the static lifetime
 
 error[E0477]: the type `*mut &'a isize` does not fulfill the required lifetime
-  --> $DIR/regions-bounded-by-trait-requiring-static.rs:71:5
+  --> $DIR/regions-bounded-by-trait-requiring-static.rs:69:5
    |
 LL |     assert_send::<*mut &'a isize>(); //~ ERROR does not fulfill the required lifetime
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters.nll.stderr b/src/test/ui/regions/regions-bounded-method-type-parameters.nll.stderr
new file mode 100644
index 00000000000..91e0f7f73ee
--- /dev/null
+++ b/src/test/ui/regions/regions-bounded-method-type-parameters.nll.stderr
@@ -0,0 +1,19 @@
+error[E0621]: explicit lifetime required in the type of `x`
+  --> $DIR/regions-bounded-method-type-parameters.rs:22:5
+   |
+LL | fn caller<'a>(x: &isize) {
+   |                  ------ help: add explicit lifetime `'a` to the type of `x`: `&'a isize`
+LL |     Foo.some_method::<&'a isize>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'a` required
+
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-bounded-method-type-parameters.rs:22:5
+   |
+LL | fn caller<'a>(x: &isize) {
+   |           -- lifetime `'a` defined here
+LL |     Foo.some_method::<&'a isize>();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0621`.
diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters.rs b/src/test/ui/regions/regions-bounded-method-type-parameters.rs
index b53c80c3963..da4e8231a23 100644
--- a/src/test/ui/regions/regions-bounded-method-type-parameters.rs
+++ b/src/test/ui/regions/regions-bounded-method-type-parameters.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 // Check that explicit region bounds are allowed on the various
 // nominal types (but not on other types) and that they are type
 // checked.
diff --git a/src/test/ui/regions/regions-bounded-method-type-parameters.stderr b/src/test/ui/regions/regions-bounded-method-type-parameters.stderr
index b8953a1719c..8649ca9281f 100644
--- a/src/test/ui/regions/regions-bounded-method-type-parameters.stderr
+++ b/src/test/ui/regions/regions-bounded-method-type-parameters.stderr
@@ -1,5 +1,5 @@
 error[E0477]: the type `&'a isize` does not fulfill the required lifetime
-  --> $DIR/regions-bounded-method-type-parameters.rs:24:9
+  --> $DIR/regions-bounded-method-type-parameters.rs:22:9
    |
 LL |     Foo.some_method::<&'a isize>();
    |         ^^^^^^^^^^^
diff --git a/src/test/ui/regions/regions-infer-contravariance-due-to-decl.nll.stderr b/src/test/ui/regions/regions-infer-contravariance-due-to-decl.nll.stderr
new file mode 100644
index 00000000000..2f3c7166867
--- /dev/null
+++ b/src/test/ui/regions/regions-infer-contravariance-due-to-decl.nll.stderr
@@ -0,0 +1,13 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-infer-contravariance-due-to-decl.rs:35:9
+   |
+LL | fn use_<'short,'long>(c: Contravariant<'short>,
+   |         ------ ----- lifetime `'long` defined here
+   |         |
+   |         lifetime `'short` defined here
+...
+LL |     let _: Contravariant<'long> = c; //~ ERROR E0623
+   |         ^ type annotation requires that `'short` must outlive `'long`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/regions/regions-infer-contravariance-due-to-decl.rs b/src/test/ui/regions/regions-infer-contravariance-due-to-decl.rs
index a16001b5788..6e1c765724b 100644
--- a/src/test/ui/regions/regions-infer-contravariance-due-to-decl.rs
+++ b/src/test/ui/regions/regions-infer-contravariance-due-to-decl.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 // Test that a type which is contravariant with respect to its region
 // parameter yields an error when used in a covariant way.
 //
diff --git a/src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr b/src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr
index 675cbc58583..10cc253397f 100644
--- a/src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr
+++ b/src/test/ui/regions/regions-infer-contravariance-due-to-decl.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/regions-infer-contravariance-due-to-decl.rs:37:35
+  --> $DIR/regions-infer-contravariance-due-to-decl.rs:35:35
    |
 LL | fn use_<'short,'long>(c: Contravariant<'short>,
    |                          --------------------- these two types are declared with different lifetimes...
diff --git a/src/test/ui/regions/regions-infer-covariance-due-to-decl.nll.stderr b/src/test/ui/regions/regions-infer-covariance-due-to-decl.nll.stderr
new file mode 100644
index 00000000000..835438e9e5d
--- /dev/null
+++ b/src/test/ui/regions/regions-infer-covariance-due-to-decl.nll.stderr
@@ -0,0 +1,13 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-infer-covariance-due-to-decl.rs:32:9
+   |
+LL | fn use_<'short,'long>(c: Covariant<'long>,
+   |         ------ ----- lifetime `'long` defined here
+   |         |
+   |         lifetime `'short` defined here
+...
+LL |     let _: Covariant<'short> = c; //~ ERROR E0623
+   |         ^ type annotation requires that `'short` must outlive `'long`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/regions/regions-infer-covariance-due-to-decl.rs b/src/test/ui/regions/regions-infer-covariance-due-to-decl.rs
index f794063610a..1ab8ba4439b 100644
--- a/src/test/ui/regions/regions-infer-covariance-due-to-decl.rs
+++ b/src/test/ui/regions/regions-infer-covariance-due-to-decl.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 // Test that a type which is covariant with respect to its region
 // parameter yields an error when used in a contravariant way.
 //
diff --git a/src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr b/src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr
index 6b3673a8002..fd853629f37 100644
--- a/src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr
+++ b/src/test/ui/regions/regions-infer-covariance-due-to-decl.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/regions-infer-covariance-due-to-decl.rs:34:32
+  --> $DIR/regions-infer-covariance-due-to-decl.rs:32:32
    |
 LL | fn use_<'short,'long>(c: Covariant<'long>,
    |                          ----------------
diff --git a/src/test/ui/regions/regions-outlives-projection-container.rs b/src/test/ui/regions/regions-outlives-projection-container.rs
index 180a8b05244..e4b7a0f82db 100644
--- a/src/test/ui/regions/regions-outlives-projection-container.rs
+++ b/src/test/ui/regions/regions-outlives-projection-container.rs
@@ -14,8 +14,6 @@
 // type of a bound that appears in the where clause on a struct must
 // outlive the location in which the type appears. Issue #22246.
 
-// ignore-compare-mode-nll
-
 #![allow(dead_code)]
 #![feature(rustc_attrs)]
 
diff --git a/src/test/ui/regions/regions-outlives-projection-container.stderr b/src/test/ui/regions/regions-outlives-projection-container.stderr
index 4b8d445ff4a..2a698f9bff5 100644
--- a/src/test/ui/regions/regions-outlives-projection-container.stderr
+++ b/src/test/ui/regions/regions-outlives-projection-container.stderr
@@ -1,67 +1,67 @@
 error[E0491]: in type `&'a WithAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-outlives-projection-container.rs:52:12
+  --> $DIR/regions-outlives-projection-container.rs:50:12
    |
 LL |     let _: &'a WithAssoc<TheType<'b>> = loop { }; //~ ERROR reference has a longer lifetime
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: the pointer is valid for the lifetime 'a as defined on the function body at 46:15
-  --> $DIR/regions-outlives-projection-container.rs:46:15
+note: the pointer is valid for the lifetime 'a as defined on the function body at 44:15
+  --> $DIR/regions-outlives-projection-container.rs:44:15
    |
 LL | fn with_assoc<'a,'b>() {
    |               ^^
-note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 46:18
-  --> $DIR/regions-outlives-projection-container.rs:46:18
+note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 44:18
+  --> $DIR/regions-outlives-projection-container.rs:44:18
    |
 LL | fn with_assoc<'a,'b>() {
    |                  ^^
 
 error[E0491]: in type `&'a WithoutAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-outlives-projection-container.rs:69:12
+  --> $DIR/regions-outlives-projection-container.rs:67:12
    |
 LL |     let _: &'a WithoutAssoc<TheType<'b>> = loop { }; //~ ERROR reference has a longer lifetime
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: the pointer is valid for the lifetime 'a as defined on the function body at 65:18
-  --> $DIR/regions-outlives-projection-container.rs:65:18
+note: the pointer is valid for the lifetime 'a as defined on the function body at 63:18
+  --> $DIR/regions-outlives-projection-container.rs:63:18
    |
 LL | fn without_assoc<'a,'b>() {
    |                  ^^
-note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 65:21
-  --> $DIR/regions-outlives-projection-container.rs:65:21
+note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 63:21
+  --> $DIR/regions-outlives-projection-container.rs:63:21
    |
 LL | fn without_assoc<'a,'b>() {
    |                     ^^
 
 error[E0491]: in type `&'a WithAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-outlives-projection-container.rs:77:12
+  --> $DIR/regions-outlives-projection-container.rs:75:12
    |
 LL |     call::<&'a WithAssoc<TheType<'b>>>();
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: the pointer is valid for the lifetime 'a as defined on the function body at 72:20
-  --> $DIR/regions-outlives-projection-container.rs:72:20
+note: the pointer is valid for the lifetime 'a as defined on the function body at 70:20
+  --> $DIR/regions-outlives-projection-container.rs:70:20
    |
 LL | fn call_with_assoc<'a,'b>() {
    |                    ^^
-note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 72:23
-  --> $DIR/regions-outlives-projection-container.rs:72:23
+note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 70:23
+  --> $DIR/regions-outlives-projection-container.rs:70:23
    |
 LL | fn call_with_assoc<'a,'b>() {
    |                       ^^
 
 error[E0491]: in type `&'a WithoutAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-outlives-projection-container.rs:84:12
+  --> $DIR/regions-outlives-projection-container.rs:82:12
    |
 LL |     call::<&'a WithoutAssoc<TheType<'b>>>(); //~ ERROR reference has a longer lifetime
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: the pointer is valid for the lifetime 'a as defined on the function body at 81:23
-  --> $DIR/regions-outlives-projection-container.rs:81:23
+note: the pointer is valid for the lifetime 'a as defined on the function body at 79:23
+  --> $DIR/regions-outlives-projection-container.rs:79:23
    |
 LL | fn call_without_assoc<'a,'b>() {
    |                       ^^
-note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 81:26
-  --> $DIR/regions-outlives-projection-container.rs:81:26
+note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 79:26
+  --> $DIR/regions-outlives-projection-container.rs:79:26
    |
 LL | fn call_without_assoc<'a,'b>() {
    |                          ^^
diff --git a/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.nll.stderr b/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.nll.stderr
new file mode 100644
index 00000000000..706d00a8424
--- /dev/null
+++ b/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.nll.stderr
@@ -0,0 +1,13 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-variance-contravariant-use-covariant-in-second-position.rs:35:9
+   |
+LL | fn use_<'short,'long>(c: S<'long, 'short>,
+   |         ------ ----- lifetime `'long` defined here
+   |         |
+   |         lifetime `'short` defined here
+...
+LL |     let _: S<'long, 'long> = c; //~ ERROR E0623
+   |         ^ type annotation requires that `'short` must outlive `'long`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.rs b/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.rs
index a028bae4001..1dfebd54ec3 100644
--- a/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.rs
+++ b/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 // Test that a type which is covariant with respect to its region
 // parameter yields an error when used in a contravariant way.
 //
diff --git a/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr b/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr
index fd1d3ab99f3..45105e8714c 100644
--- a/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr
+++ b/src/test/ui/regions/regions-variance-contravariant-use-covariant-in-second-position.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/regions-variance-contravariant-use-covariant-in-second-position.rs:37:30
+  --> $DIR/regions-variance-contravariant-use-covariant-in-second-position.rs:35:30
    |
 LL | fn use_<'short,'long>(c: S<'long, 'short>,
    |                          ----------------
diff --git a/src/test/ui/regions/regions-variance-contravariant-use-covariant.nll.stderr b/src/test/ui/regions/regions-variance-contravariant-use-covariant.nll.stderr
new file mode 100644
index 00000000000..144aa67f905
--- /dev/null
+++ b/src/test/ui/regions/regions-variance-contravariant-use-covariant.nll.stderr
@@ -0,0 +1,13 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-variance-contravariant-use-covariant.rs:33:9
+   |
+LL | fn use_<'short,'long>(c: Contravariant<'short>,
+   |         ------ ----- lifetime `'long` defined here
+   |         |
+   |         lifetime `'short` defined here
+...
+LL |     let _: Contravariant<'long> = c; //~ ERROR E0623
+   |         ^ type annotation requires that `'short` must outlive `'long`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/regions/regions-variance-contravariant-use-covariant.rs b/src/test/ui/regions/regions-variance-contravariant-use-covariant.rs
index 84c4e52a9c0..caf6a86fc0b 100644
--- a/src/test/ui/regions/regions-variance-contravariant-use-covariant.rs
+++ b/src/test/ui/regions/regions-variance-contravariant-use-covariant.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 // Test that a type which is covariant with respect to its region
 // parameter yields an error when used in a contravariant way.
 //
diff --git a/src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr b/src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr
index a1e4913aa3a..c883691c348 100644
--- a/src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr
+++ b/src/test/ui/regions/regions-variance-contravariant-use-covariant.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/regions-variance-contravariant-use-covariant.rs:35:35
+  --> $DIR/regions-variance-contravariant-use-covariant.rs:33:35
    |
 LL | fn use_<'short,'long>(c: Contravariant<'short>,
    |                          --------------------- these two types are declared with different lifetimes...
diff --git a/src/test/ui/regions/regions-variance-covariant-use-contravariant.nll.stderr b/src/test/ui/regions/regions-variance-covariant-use-contravariant.nll.stderr
new file mode 100644
index 00000000000..c9789f8555e
--- /dev/null
+++ b/src/test/ui/regions/regions-variance-covariant-use-contravariant.nll.stderr
@@ -0,0 +1,13 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-variance-covariant-use-contravariant.rs:33:9
+   |
+LL | fn use_<'short,'long>(c: Covariant<'long>,
+   |         ------ ----- lifetime `'long` defined here
+   |         |
+   |         lifetime `'short` defined here
+...
+LL |     let _: Covariant<'short> = c; //~ ERROR E0623
+   |         ^ type annotation requires that `'short` must outlive `'long`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/regions/regions-variance-covariant-use-contravariant.rs b/src/test/ui/regions/regions-variance-covariant-use-contravariant.rs
index 824a442c87d..60dc3d94a2e 100644
--- a/src/test/ui/regions/regions-variance-covariant-use-contravariant.rs
+++ b/src/test/ui/regions/regions-variance-covariant-use-contravariant.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 // Test that a type which is covariant with respect to its region
 // parameter yields an error when used in a contravariant way.
 //
diff --git a/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr b/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr
index fc1c6c304f8..a448d26f81b 100644
--- a/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr
+++ b/src/test/ui/regions/regions-variance-covariant-use-contravariant.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/regions-variance-covariant-use-contravariant.rs:35:32
+  --> $DIR/regions-variance-covariant-use-contravariant.rs:33:32
    |
 LL | fn use_<'short,'long>(c: Covariant<'long>,
    |                          ----------------
diff --git a/src/test/ui/regions/regions-variance-invariant-use-contravariant.nll.stderr b/src/test/ui/regions/regions-variance-invariant-use-contravariant.nll.stderr
new file mode 100644
index 00000000000..488b70b5f0f
--- /dev/null
+++ b/src/test/ui/regions/regions-variance-invariant-use-contravariant.nll.stderr
@@ -0,0 +1,13 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-variance-invariant-use-contravariant.rs:30:9
+   |
+LL | fn use_<'short,'long>(c: Invariant<'long>,
+   |         ------ ----- lifetime `'long` defined here
+   |         |
+   |         lifetime `'short` defined here
+...
+LL |     let _: Invariant<'short> = c; //~ ERROR E0623
+   |         ^ type annotation requires that `'short` must outlive `'long`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/regions/regions-variance-invariant-use-contravariant.rs b/src/test/ui/regions/regions-variance-invariant-use-contravariant.rs
index 9c6db331c01..96478fa5909 100644
--- a/src/test/ui/regions/regions-variance-invariant-use-contravariant.rs
+++ b/src/test/ui/regions/regions-variance-invariant-use-contravariant.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 // Test that an invariant region parameter used in a contravariant way
 // yields an error.
 //
diff --git a/src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr b/src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr
index 6b67e6b192e..1b0cd8e646a 100644
--- a/src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr
+++ b/src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/regions-variance-invariant-use-contravariant.rs:32:32
+  --> $DIR/regions-variance-invariant-use-contravariant.rs:30:32
    |
 LL | fn use_<'short,'long>(c: Invariant<'long>,
    |                          ----------------
diff --git a/src/test/ui/regions/regions-variance-invariant-use-covariant.nll.stderr b/src/test/ui/regions/regions-variance-invariant-use-covariant.nll.stderr
new file mode 100644
index 00000000000..fa7cfc33dc0
--- /dev/null
+++ b/src/test/ui/regions/regions-variance-invariant-use-covariant.nll.stderr
@@ -0,0 +1,11 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/regions-variance-invariant-use-covariant.rs:27:9
+   |
+LL | fn use_<'b>(c: Invariant<'b>) {
+   |         -- lifetime `'b` defined here
+...
+LL |     let _: Invariant<'static> = c; //~ ERROR mismatched types
+   |         ^ type annotation requires that `'b` must outlive `'static`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/regions/regions-variance-invariant-use-covariant.rs b/src/test/ui/regions/regions-variance-invariant-use-covariant.rs
index ed393de357a..bd944a8b52c 100644
--- a/src/test/ui/regions/regions-variance-invariant-use-covariant.rs
+++ b/src/test/ui/regions/regions-variance-invariant-use-covariant.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 // Test that a type which is invariant with respect to its region
 // parameter used in a covariant way yields an error.
 //
diff --git a/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr b/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr
index 5b50f4bd513..34111120a08 100644
--- a/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr
+++ b/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr
@@ -1,13 +1,13 @@
 error[E0308]: mismatched types
-  --> $DIR/regions-variance-invariant-use-covariant.rs:29:33
+  --> $DIR/regions-variance-invariant-use-covariant.rs:27:33
    |
 LL |     let _: Invariant<'static> = c; //~ ERROR mismatched types
    |                                 ^ lifetime mismatch
    |
    = note: expected type `Invariant<'static>`
               found type `Invariant<'b>`
-note: the lifetime 'b as defined on the function body at 23:9...
-  --> $DIR/regions-variance-invariant-use-covariant.rs:23:9
+note: the lifetime 'b as defined on the function body at 21:9...
+  --> $DIR/regions-variance-invariant-use-covariant.rs:21:9
    |
 LL | fn use_<'b>(c: Invariant<'b>) {
    |         ^^
diff --git a/src/test/ui/variance/variance-cell-is-invariant.nll.stderr b/src/test/ui/variance/variance-cell-is-invariant.nll.stderr
new file mode 100644
index 00000000000..0172fcdc8f1
--- /dev/null
+++ b/src/test/ui/variance/variance-cell-is-invariant.nll.stderr
@@ -0,0 +1,13 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-cell-is-invariant.rs:24:9
+   |
+LL | fn use_<'short,'long>(c: Foo<'short>,
+   |         ------ ----- lifetime `'long` defined here
+   |         |
+   |         lifetime `'short` defined here
+...
+LL |     let _: Foo<'long> = c; //~ ERROR E0623
+   |         ^ type annotation requires that `'short` must outlive `'long`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/variance/variance-cell-is-invariant.rs b/src/test/ui/variance/variance-cell-is-invariant.rs
index 39d87a563e5..1ddbcf4ab84 100644
--- a/src/test/ui/variance/variance-cell-is-invariant.rs
+++ b/src/test/ui/variance/variance-cell-is-invariant.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 // Test that Cell is considered invariant with respect to its
 // type.
 
diff --git a/src/test/ui/variance/variance-cell-is-invariant.stderr b/src/test/ui/variance/variance-cell-is-invariant.stderr
index 8fb5d9bf38b..86f5c1176d9 100644
--- a/src/test/ui/variance/variance-cell-is-invariant.stderr
+++ b/src/test/ui/variance/variance-cell-is-invariant.stderr
@@ -1,5 +1,5 @@
 error[E0623]: lifetime mismatch
-  --> $DIR/variance-cell-is-invariant.rs:26:25
+  --> $DIR/variance-cell-is-invariant.rs:24:25
    |
 LL | fn use_<'short,'long>(c: Foo<'short>,
    |                          ----------- these two types are declared with different lifetimes...
diff --git a/src/test/ui/variance/variance-contravariant-arg-trait-match.nll.stderr b/src/test/ui/variance/variance-contravariant-arg-trait-match.nll.stderr
new file mode 100644
index 00000000000..69981699da8
--- /dev/null
+++ b/src/test/ui/variance/variance-contravariant-arg-trait-match.nll.stderr
@@ -0,0 +1,24 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-contravariant-arg-trait-match.rs:23:5
+   |
+LL | fn get_min_from_max<'min, 'max, G>()
+   |                     ----  ---- lifetime `'max` defined here
+   |                     |
+   |                     lifetime `'min` defined here
+...
+LL |     impls_get::<G,&'min i32>() //~ ERROR mismatched types
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
+
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-contravariant-arg-trait-match.rs:31:5
+   |
+LL | fn get_max_from_min<'min, 'max, G>()
+   |                     ----  ---- lifetime `'max` defined here
+   |                     |
+   |                     lifetime `'min` defined here
+...
+LL |     impls_get::<G,&'max i32>() //~ ERROR mismatched types
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/variance/variance-contravariant-arg-trait-match.rs b/src/test/ui/variance/variance-contravariant-arg-trait-match.rs
index 96791304d93..9b6e3c9de3b 100644
--- a/src/test/ui/variance/variance-contravariant-arg-trait-match.rs
+++ b/src/test/ui/variance/variance-contravariant-arg-trait-match.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 #![allow(dead_code)]
 
 // Test that even when `T` is only used in contravariant position, it
diff --git a/src/test/ui/variance/variance-contravariant-arg-trait-match.stderr b/src/test/ui/variance/variance-contravariant-arg-trait-match.stderr
index 282220d1037..2895a9511ea 100644
--- a/src/test/ui/variance/variance-contravariant-arg-trait-match.stderr
+++ b/src/test/ui/variance/variance-contravariant-arg-trait-match.stderr
@@ -1,37 +1,37 @@
 error[E0308]: mismatched types
-  --> $DIR/variance-contravariant-arg-trait-match.rs:25:5
+  --> $DIR/variance-contravariant-arg-trait-match.rs:23:5
    |
 LL |     impls_get::<G,&'min i32>() //~ ERROR mismatched types
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
    = note: expected type `Get<&'min i32>`
               found type `Get<&'max i32>`
-note: the lifetime 'min as defined on the function body at 22:21...
-  --> $DIR/variance-contravariant-arg-trait-match.rs:22:21
+note: the lifetime 'min as defined on the function body at 20:21...
+  --> $DIR/variance-contravariant-arg-trait-match.rs:20:21
    |
 LL | fn get_min_from_max<'min, 'max, G>()
    |                     ^^^^
-note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 22:27
-  --> $DIR/variance-contravariant-arg-trait-match.rs:22:27
+note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 20:27
+  --> $DIR/variance-contravariant-arg-trait-match.rs:20:27
    |
 LL | fn get_min_from_max<'min, 'max, G>()
    |                           ^^^^
 
 error[E0308]: mismatched types
-  --> $DIR/variance-contravariant-arg-trait-match.rs:33:5
+  --> $DIR/variance-contravariant-arg-trait-match.rs:31:5
    |
 LL |     impls_get::<G,&'max i32>() //~ ERROR mismatched types
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
    = note: expected type `Get<&'max i32>`
               found type `Get<&'min i32>`
-note: the lifetime 'min as defined on the function body at 28:21...
-  --> $DIR/variance-contravariant-arg-trait-match.rs:28:21
+note: the lifetime 'min as defined on the function body at 26:21...
+  --> $DIR/variance-contravariant-arg-trait-match.rs:26:21
    |
 LL | fn get_max_from_min<'min, 'max, G>()
    |                     ^^^^
-note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 28:27
-  --> $DIR/variance-contravariant-arg-trait-match.rs:28:27
+note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 26:27
+  --> $DIR/variance-contravariant-arg-trait-match.rs:26:27
    |
 LL | fn get_max_from_min<'min, 'max, G>()
    |                           ^^^^
diff --git a/src/test/ui/variance/variance-contravariant-self-trait-match.nll.stderr b/src/test/ui/variance/variance-contravariant-self-trait-match.nll.stderr
new file mode 100644
index 00000000000..a8566814c64
--- /dev/null
+++ b/src/test/ui/variance/variance-contravariant-self-trait-match.nll.stderr
@@ -0,0 +1,24 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-contravariant-self-trait-match.rs:23:5
+   |
+LL | fn get_min_from_max<'min, 'max, G>()
+   |                     ----  ---- lifetime `'max` defined here
+   |                     |
+   |                     lifetime `'min` defined here
+...
+LL |     impls_get::<&'min G>(); //~ ERROR mismatched types
+   |     ^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
+
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-contravariant-self-trait-match.rs:32:5
+   |
+LL | fn get_max_from_min<'min, 'max, G>()
+   |                     ----  ---- lifetime `'max` defined here
+   |                     |
+   |                     lifetime `'min` defined here
+...
+LL |     impls_get::<&'max G>(); //~ ERROR mismatched types
+   |     ^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/variance/variance-contravariant-self-trait-match.rs b/src/test/ui/variance/variance-contravariant-self-trait-match.rs
index c04ba8862c3..6d9d1e61fed 100644
--- a/src/test/ui/variance/variance-contravariant-self-trait-match.rs
+++ b/src/test/ui/variance/variance-contravariant-self-trait-match.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 #![allow(dead_code)]
 
 // Test that even when `Self` is only used in contravariant position, it
diff --git a/src/test/ui/variance/variance-contravariant-self-trait-match.stderr b/src/test/ui/variance/variance-contravariant-self-trait-match.stderr
index 9e60a70bc16..bc3f274a861 100644
--- a/src/test/ui/variance/variance-contravariant-self-trait-match.stderr
+++ b/src/test/ui/variance/variance-contravariant-self-trait-match.stderr
@@ -1,37 +1,37 @@
 error[E0308]: mismatched types
-  --> $DIR/variance-contravariant-self-trait-match.rs:25:5
+  --> $DIR/variance-contravariant-self-trait-match.rs:23:5
    |
 LL |     impls_get::<&'min G>(); //~ ERROR mismatched types
    |     ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
    = note: expected type `Get`
               found type `Get`
-note: the lifetime 'min as defined on the function body at 22:21...
-  --> $DIR/variance-contravariant-self-trait-match.rs:22:21
+note: the lifetime 'min as defined on the function body at 20:21...
+  --> $DIR/variance-contravariant-self-trait-match.rs:20:21
    |
 LL | fn get_min_from_max<'min, 'max, G>()
    |                     ^^^^
-note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 22:27
-  --> $DIR/variance-contravariant-self-trait-match.rs:22:27
+note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 20:27
+  --> $DIR/variance-contravariant-self-trait-match.rs:20:27
    |
 LL | fn get_min_from_max<'min, 'max, G>()
    |                           ^^^^
 
 error[E0308]: mismatched types
-  --> $DIR/variance-contravariant-self-trait-match.rs:34:5
+  --> $DIR/variance-contravariant-self-trait-match.rs:32:5
    |
 LL |     impls_get::<&'max G>(); //~ ERROR mismatched types
    |     ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
    = note: expected type `Get`
               found type `Get`
-note: the lifetime 'min as defined on the function body at 28:21...
-  --> $DIR/variance-contravariant-self-trait-match.rs:28:21
+note: the lifetime 'min as defined on the function body at 26:21...
+  --> $DIR/variance-contravariant-self-trait-match.rs:26:21
    |
 LL | fn get_max_from_min<'min, 'max, G>()
    |                     ^^^^
-note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 28:27
-  --> $DIR/variance-contravariant-self-trait-match.rs:28:27
+note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 26:27
+  --> $DIR/variance-contravariant-self-trait-match.rs:26:27
    |
 LL | fn get_max_from_min<'min, 'max, G>()
    |                           ^^^^
diff --git a/src/test/ui/variance/variance-covariant-arg-trait-match.nll.stderr b/src/test/ui/variance/variance-covariant-arg-trait-match.nll.stderr
new file mode 100644
index 00000000000..bb3f5f5711c
--- /dev/null
+++ b/src/test/ui/variance/variance-covariant-arg-trait-match.nll.stderr
@@ -0,0 +1,24 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-covariant-arg-trait-match.rs:24:5
+   |
+LL | fn get_min_from_max<'min, 'max, G>()
+   |                     ----  ---- lifetime `'max` defined here
+   |                     |
+   |                     lifetime `'min` defined here
+...
+LL |     impls_get::<G,&'min i32>() //~ ERROR mismatched types
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
+
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-covariant-arg-trait-match.rs:30:5
+   |
+LL | fn get_max_from_min<'min, 'max, G>()
+   |                     ----  ---- lifetime `'max` defined here
+   |                     |
+   |                     lifetime `'min` defined here
+...
+LL |     impls_get::<G,&'max i32>() //~ ERROR mismatched types
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/variance/variance-covariant-arg-trait-match.rs b/src/test/ui/variance/variance-covariant-arg-trait-match.rs
index fbda62f34fa..c42a845b3b5 100644
--- a/src/test/ui/variance/variance-covariant-arg-trait-match.rs
+++ b/src/test/ui/variance/variance-covariant-arg-trait-match.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 #![allow(dead_code)]
 
 // Test that even when `T` is only used in covariant position, it
diff --git a/src/test/ui/variance/variance-covariant-arg-trait-match.stderr b/src/test/ui/variance/variance-covariant-arg-trait-match.stderr
index 648acc2119f..7692a6646f2 100644
--- a/src/test/ui/variance/variance-covariant-arg-trait-match.stderr
+++ b/src/test/ui/variance/variance-covariant-arg-trait-match.stderr
@@ -1,37 +1,37 @@
 error[E0308]: mismatched types
-  --> $DIR/variance-covariant-arg-trait-match.rs:26:5
+  --> $DIR/variance-covariant-arg-trait-match.rs:24:5
    |
 LL |     impls_get::<G,&'min i32>() //~ ERROR mismatched types
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
    = note: expected type `Get<&'min i32>`
               found type `Get<&'max i32>`
-note: the lifetime 'min as defined on the function body at 22:21...
-  --> $DIR/variance-covariant-arg-trait-match.rs:22:21
+note: the lifetime 'min as defined on the function body at 20:21...
+  --> $DIR/variance-covariant-arg-trait-match.rs:20:21
    |
 LL | fn get_min_from_max<'min, 'max, G>()
    |                     ^^^^
-note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 22:27
-  --> $DIR/variance-covariant-arg-trait-match.rs:22:27
+note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 20:27
+  --> $DIR/variance-covariant-arg-trait-match.rs:20:27
    |
 LL | fn get_min_from_max<'min, 'max, G>()
    |                           ^^^^
 
 error[E0308]: mismatched types
-  --> $DIR/variance-covariant-arg-trait-match.rs:32:5
+  --> $DIR/variance-covariant-arg-trait-match.rs:30:5
    |
 LL |     impls_get::<G,&'max i32>() //~ ERROR mismatched types
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
    = note: expected type `Get<&'max i32>`
               found type `Get<&'min i32>`
-note: the lifetime 'min as defined on the function body at 29:21...
-  --> $DIR/variance-covariant-arg-trait-match.rs:29:21
+note: the lifetime 'min as defined on the function body at 27:21...
+  --> $DIR/variance-covariant-arg-trait-match.rs:27:21
    |
 LL | fn get_max_from_min<'min, 'max, G>()
    |                     ^^^^
-note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 29:27
-  --> $DIR/variance-covariant-arg-trait-match.rs:29:27
+note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 27:27
+  --> $DIR/variance-covariant-arg-trait-match.rs:27:27
    |
 LL | fn get_max_from_min<'min, 'max, G>()
    |                           ^^^^
diff --git a/src/test/ui/variance/variance-covariant-self-trait-match.nll.stderr b/src/test/ui/variance/variance-covariant-self-trait-match.nll.stderr
new file mode 100644
index 00000000000..3bbf9c0d3f5
--- /dev/null
+++ b/src/test/ui/variance/variance-covariant-self-trait-match.nll.stderr
@@ -0,0 +1,24 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-covariant-self-trait-match.rs:24:5
+   |
+LL | fn get_min_from_max<'min, 'max, G>()
+   |                     ----  ---- lifetime `'max` defined here
+   |                     |
+   |                     lifetime `'min` defined here
+...
+LL |     impls_get::<&'min G>(); //~ ERROR mismatched types
+   |     ^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
+
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-covariant-self-trait-match.rs:30:5
+   |
+LL | fn get_max_from_min<'min, 'max, G>()
+   |                     ----  ---- lifetime `'max` defined here
+   |                     |
+   |                     lifetime `'min` defined here
+...
+LL |     impls_get::<&'max G>(); //~ ERROR mismatched types
+   |     ^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/variance/variance-covariant-self-trait-match.rs b/src/test/ui/variance/variance-covariant-self-trait-match.rs
index 3e0c1da3bca..25148dfc020 100644
--- a/src/test/ui/variance/variance-covariant-self-trait-match.rs
+++ b/src/test/ui/variance/variance-covariant-self-trait-match.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 #![allow(dead_code)]
 
 // Test that even when `Self` is only used in covariant position, it
diff --git a/src/test/ui/variance/variance-covariant-self-trait-match.stderr b/src/test/ui/variance/variance-covariant-self-trait-match.stderr
index cb8fe0b7890..aa82b69bbbc 100644
--- a/src/test/ui/variance/variance-covariant-self-trait-match.stderr
+++ b/src/test/ui/variance/variance-covariant-self-trait-match.stderr
@@ -1,37 +1,37 @@
 error[E0308]: mismatched types
-  --> $DIR/variance-covariant-self-trait-match.rs:26:5
+  --> $DIR/variance-covariant-self-trait-match.rs:24:5
    |
 LL |     impls_get::<&'min G>(); //~ ERROR mismatched types
    |     ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
    = note: expected type `Get`
               found type `Get`
-note: the lifetime 'min as defined on the function body at 22:21...
-  --> $DIR/variance-covariant-self-trait-match.rs:22:21
+note: the lifetime 'min as defined on the function body at 20:21...
+  --> $DIR/variance-covariant-self-trait-match.rs:20:21
    |
 LL | fn get_min_from_max<'min, 'max, G>()
    |                     ^^^^
-note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 22:27
-  --> $DIR/variance-covariant-self-trait-match.rs:22:27
+note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 20:27
+  --> $DIR/variance-covariant-self-trait-match.rs:20:27
    |
 LL | fn get_min_from_max<'min, 'max, G>()
    |                           ^^^^
 
 error[E0308]: mismatched types
-  --> $DIR/variance-covariant-self-trait-match.rs:32:5
+  --> $DIR/variance-covariant-self-trait-match.rs:30:5
    |
 LL |     impls_get::<&'max G>(); //~ ERROR mismatched types
    |     ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
    = note: expected type `Get`
               found type `Get`
-note: the lifetime 'min as defined on the function body at 29:21...
-  --> $DIR/variance-covariant-self-trait-match.rs:29:21
+note: the lifetime 'min as defined on the function body at 27:21...
+  --> $DIR/variance-covariant-self-trait-match.rs:27:21
    |
 LL | fn get_max_from_min<'min, 'max, G>()
    |                     ^^^^
-note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 29:27
-  --> $DIR/variance-covariant-self-trait-match.rs:29:27
+note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 27:27
+  --> $DIR/variance-covariant-self-trait-match.rs:27:27
    |
 LL | fn get_max_from_min<'min, 'max, G>()
    |                           ^^^^
diff --git a/src/test/ui/variance/variance-invariant-arg-trait-match.nll.stderr b/src/test/ui/variance/variance-invariant-arg-trait-match.nll.stderr
new file mode 100644
index 00000000000..be9f5a632dd
--- /dev/null
+++ b/src/test/ui/variance/variance-invariant-arg-trait-match.nll.stderr
@@ -0,0 +1,24 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-invariant-arg-trait-match.rs:20:5
+   |
+LL | fn get_min_from_max<'min, 'max, G>()
+   |                     ----  ---- lifetime `'max` defined here
+   |                     |
+   |                     lifetime `'min` defined here
+...
+LL |     impls_get::<G,&'min i32>() //~ ERROR mismatched types
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
+
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-invariant-arg-trait-match.rs:26:5
+   |
+LL | fn get_max_from_min<'min, 'max, G>()
+   |                     ----  ---- lifetime `'max` defined here
+   |                     |
+   |                     lifetime `'min` defined here
+...
+LL |     impls_get::<G,&'max i32>() //~ ERROR mismatched types
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/variance/variance-invariant-arg-trait-match.rs b/src/test/ui/variance/variance-invariant-arg-trait-match.rs
index 771fcdeb62f..45fed0b083d 100644
--- a/src/test/ui/variance/variance-invariant-arg-trait-match.rs
+++ b/src/test/ui/variance/variance-invariant-arg-trait-match.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 #![allow(dead_code)]
 
 trait Get<T> {
diff --git a/src/test/ui/variance/variance-invariant-arg-trait-match.stderr b/src/test/ui/variance/variance-invariant-arg-trait-match.stderr
index 3f635495069..fc0d5e486de 100644
--- a/src/test/ui/variance/variance-invariant-arg-trait-match.stderr
+++ b/src/test/ui/variance/variance-invariant-arg-trait-match.stderr
@@ -1,37 +1,37 @@
 error[E0308]: mismatched types
-  --> $DIR/variance-invariant-arg-trait-match.rs:22:5
+  --> $DIR/variance-invariant-arg-trait-match.rs:20:5
    |
 LL |     impls_get::<G,&'min i32>() //~ ERROR mismatched types
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
    = note: expected type `Get<&'min i32>`
               found type `Get<&'max i32>`
-note: the lifetime 'min as defined on the function body at 19:21...
-  --> $DIR/variance-invariant-arg-trait-match.rs:19:21
+note: the lifetime 'min as defined on the function body at 17:21...
+  --> $DIR/variance-invariant-arg-trait-match.rs:17:21
    |
 LL | fn get_min_from_max<'min, 'max, G>()
    |                     ^^^^
-note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 19:27
-  --> $DIR/variance-invariant-arg-trait-match.rs:19:27
+note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 17:27
+  --> $DIR/variance-invariant-arg-trait-match.rs:17:27
    |
 LL | fn get_min_from_max<'min, 'max, G>()
    |                           ^^^^
 
 error[E0308]: mismatched types
-  --> $DIR/variance-invariant-arg-trait-match.rs:28:5
+  --> $DIR/variance-invariant-arg-trait-match.rs:26:5
    |
 LL |     impls_get::<G,&'max i32>() //~ ERROR mismatched types
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
    = note: expected type `Get<&'max i32>`
               found type `Get<&'min i32>`
-note: the lifetime 'min as defined on the function body at 25:21...
-  --> $DIR/variance-invariant-arg-trait-match.rs:25:21
+note: the lifetime 'min as defined on the function body at 23:21...
+  --> $DIR/variance-invariant-arg-trait-match.rs:23:21
    |
 LL | fn get_max_from_min<'min, 'max, G>()
    |                     ^^^^
-note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 25:27
-  --> $DIR/variance-invariant-arg-trait-match.rs:25:27
+note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 23:27
+  --> $DIR/variance-invariant-arg-trait-match.rs:23:27
    |
 LL | fn get_max_from_min<'min, 'max, G>()
    |                           ^^^^
diff --git a/src/test/ui/variance/variance-invariant-self-trait-match.nll.stderr b/src/test/ui/variance/variance-invariant-self-trait-match.nll.stderr
new file mode 100644
index 00000000000..f5827856a1b
--- /dev/null
+++ b/src/test/ui/variance/variance-invariant-self-trait-match.nll.stderr
@@ -0,0 +1,24 @@
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-invariant-self-trait-match.rs:20:5
+   |
+LL | fn get_min_from_max<'min, 'max, G>()
+   |                     ----  ---- lifetime `'max` defined here
+   |                     |
+   |                     lifetime `'min` defined here
+...
+LL |     impls_get::<&'min G>(); //~ ERROR mismatched types
+   |     ^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
+
+error: unsatisfied lifetime constraints
+  --> $DIR/variance-invariant-self-trait-match.rs:26:5
+   |
+LL | fn get_max_from_min<'min, 'max, G>()
+   |                     ----  ---- lifetime `'max` defined here
+   |                     |
+   |                     lifetime `'min` defined here
+...
+LL |     impls_get::<&'max G>(); //~ ERROR mismatched types
+   |     ^^^^^^^^^^^^^^^^^^^^^^ requires that `'min` must outlive `'max`
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/ui/variance/variance-invariant-self-trait-match.rs b/src/test/ui/variance/variance-invariant-self-trait-match.rs
index 57abf6f8979..fe61dee23bc 100644
--- a/src/test/ui/variance/variance-invariant-self-trait-match.rs
+++ b/src/test/ui/variance/variance-invariant-self-trait-match.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-compare-mode-nll
-
 #![allow(dead_code)]
 
 trait Get {
diff --git a/src/test/ui/variance/variance-invariant-self-trait-match.stderr b/src/test/ui/variance/variance-invariant-self-trait-match.stderr
index 1b864abc4f0..b34f027e895 100644
--- a/src/test/ui/variance/variance-invariant-self-trait-match.stderr
+++ b/src/test/ui/variance/variance-invariant-self-trait-match.stderr
@@ -1,37 +1,37 @@
 error[E0308]: mismatched types
-  --> $DIR/variance-invariant-self-trait-match.rs:22:5
+  --> $DIR/variance-invariant-self-trait-match.rs:20:5
    |
 LL |     impls_get::<&'min G>(); //~ ERROR mismatched types
    |     ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
    = note: expected type `Get`
               found type `Get`
-note: the lifetime 'min as defined on the function body at 19:21...
-  --> $DIR/variance-invariant-self-trait-match.rs:19:21
+note: the lifetime 'min as defined on the function body at 17:21...
+  --> $DIR/variance-invariant-self-trait-match.rs:17:21
    |
 LL | fn get_min_from_max<'min, 'max, G>()
    |                     ^^^^
-note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 19:27
-  --> $DIR/variance-invariant-self-trait-match.rs:19:27
+note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 17:27
+  --> $DIR/variance-invariant-self-trait-match.rs:17:27
    |
 LL | fn get_min_from_max<'min, 'max, G>()
    |                           ^^^^
 
 error[E0308]: mismatched types
-  --> $DIR/variance-invariant-self-trait-match.rs:28:5
+  --> $DIR/variance-invariant-self-trait-match.rs:26:5
    |
 LL |     impls_get::<&'max G>(); //~ ERROR mismatched types
    |     ^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
    = note: expected type `Get`
               found type `Get`
-note: the lifetime 'min as defined on the function body at 25:21...
-  --> $DIR/variance-invariant-self-trait-match.rs:25:21
+note: the lifetime 'min as defined on the function body at 23:21...
+  --> $DIR/variance-invariant-self-trait-match.rs:23:21
    |
 LL | fn get_max_from_min<'min, 'max, G>()
    |                     ^^^^
-note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 25:27
-  --> $DIR/variance-invariant-self-trait-match.rs:25:27
+note: ...does not necessarily outlive the lifetime 'max as defined on the function body at 23:27
+  --> $DIR/variance-invariant-self-trait-match.rs:23:27
    |
 LL | fn get_max_from_min<'min, 'max, G>()
    |                           ^^^^