about summary refs log tree commit diff
path: root/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/object-lifetime/object-lifetime-default-from-box-error.rs')
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-box-error.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.rs b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.rs
index 4a2665d8e16..1cb9834913c 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.rs
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.rs
@@ -1,3 +1,7 @@
+// ignore-compare-mode-nll
+// revisions: base nll
+// [nll]compile-flags: -Zborrowck=mir
+
 // Test various cases where the defaults should lead to errors being
 // reported.
 
@@ -15,7 +19,10 @@ fn load(ss: &mut SomeStruct) -> Box<dyn SomeTrait> {
     // `Box<SomeTrait>` defaults to a `'static` bound, so this return
     // is illegal.
 
-    ss.r //~ ERROR E0759
+    ss.r
+    //[base]~^ ERROR E0759
+    //[nll]~^^ ERROR lifetime may not live long enough
+    //[nll]~| ERROR cannot move out of
 }
 
 fn store(ss: &mut SomeStruct, b: Box<dyn SomeTrait>) {