]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/objects-owned-object-borrowed-method-headerless.rs
Rollup merge of #87440 - twetzel59:fix-barrier-no-op, r=yaahc
[rust.git] / src / test / ui / objects-owned-object-borrowed-method-headerless.rs
index 9b88d8ea7bcd9444b5a5ecfffe2f26d00f9a6c3f..fce1341fc74154c7105cdd86407232660fef973b 100644 (file)
@@ -3,9 +3,6 @@
 // closed over do not contain managed values, and thus the boxes do
 // not have headers.
 
-#![feature(box_syntax)]
-
-
 trait FooTrait {
     fn foo(&self) -> usize;
 }
@@ -22,9 +19,9 @@ fn foo(&self) -> usize {
 
 pub fn main() {
     let foos: Vec<Box<dyn FooTrait>> = vec![
-        box BarStruct{ x: 0 } as Box<dyn FooTrait>,
-        box BarStruct{ x: 1 } as Box<dyn FooTrait>,
-        box BarStruct{ x: 2 } as Box<dyn FooTrait>
+        Box::new(BarStruct{ x: 0 }) as Box<dyn FooTrait>,
+        Box::new(BarStruct{ x: 1 }) as Box<dyn FooTrait>,
+        Box::new(BarStruct{ x: 2 }) as Box<dyn FooTrait>,
     ];
 
     for i in 0..foos.len() {