]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/regions/regions-close-object-into-object-1.rs
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / regions / regions-close-object-into-object-1.rs
index 5518c6a94b1d0bf546795d1fb5320ad2cdc5d7f6..2dc33d5671ff0597d14d9aa7fce9ff2a87a63ae2 100644 (file)
@@ -1,7 +1,7 @@
-#![feature(box_syntax)]
 #![allow(warnings)]
 
 trait A<T> { }
+
 struct B<'a, T:'a>(&'a (A<T>+'a));
 
 trait X { }
@@ -9,7 +9,7 @@ trait X { }
 impl<'a, T> X for B<'a, T> {}
 
 fn f<'a, T:'static, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
-    box B(&*v) as Box<X> //~ ERROR cannot return value referencing local data `*v`
+    Box::new(B(&*v)) as Box<X> //~ ERROR cannot return value referencing local data `*v`
 }
 
 fn main() {}