about summary refs log tree commit diff
path: root/src/test/ui/variance/variance-invariant-arg-object.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/variance/variance-invariant-arg-object.rs')
-rw-r--r--src/test/ui/variance/variance-invariant-arg-object.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/ui/variance/variance-invariant-arg-object.rs b/src/test/ui/variance/variance-invariant-arg-object.rs
index 886d263c457..cc8820fbac6 100644
--- a/src/test/ui/variance/variance-invariant-arg-object.rs
+++ b/src/test/ui/variance/variance-invariant-arg-object.rs
@@ -1,5 +1,9 @@
 #![allow(dead_code)]
 
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
+
 trait Get<T> : 'static {
     fn get(&self, t: T) -> T;
 }
@@ -8,14 +12,18 @@ fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>)
                                 -> Box<dyn Get<&'min i32>>
     where 'max : 'min
 {
-    v //~ ERROR mismatched types
+    v
+    //[base]~^ ERROR mismatched types
+    //[nll]~^^ ERROR lifetime may not live long enough
 }
 
 fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>)
                                    -> Box<dyn Get<&'max i32>>
     where 'max : 'min
 {
-    v //~ ERROR mismatched types
+    v
+    //[base]~^ ERROR mismatched types
+    //[nll]~^^ ERROR lifetime may not live long enough
 }
 
 fn main() { }