]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.rs
Use revisions for NLL in object-lifetime
[rust.git] / src / test / ui / object-lifetime / object-lifetime-default-from-rptr-box-error.rs
index bf9e0beb57cdf8157393bc6646763520afd5800f..8cdd64be193e2277852c190f73a61dac35cf751e 100644 (file)
@@ -1,3 +1,7 @@
+// ignore-compare-mode-nll
+// revisions: base nll
+// [nll]compile-flags: -Zborrowck=mir
+
 // Test that the lifetime from the enclosing `&` is "inherited"
 // through the `Box` struct.
 
@@ -12,7 +16,9 @@ struct SomeStruct<'a> {
 }
 
 fn c<'a>(t: &'a Box<dyn Test+'a>, mut ss: SomeStruct<'a>) {
-    ss.t = t; //~ ERROR mismatched types
+    ss.t = t;
+    //[base]~^ ERROR mismatched types
+    //[nll]~^^ ERROR lifetime may not live long enough
 }
 
 fn main() {