]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs
Rollup merge of #100128 - kpreid:waker-doc, r=thomcc
[rust.git] / src / test / run-pass-valgrind / cleanup-auto-borrow-obj.rs
index fb2b4d476355e1dbe7ca21bee6ce5c471a26cb03..dfc094abeb9b4cab0d710946a2cc58f2b9893bd9 100644 (file)
@@ -2,8 +2,6 @@
 // schedule cleanups when auto borrowing trait objects.
 // This program should be valgrind clean.
 
-#![feature(box_syntax)]
-
 static mut DROP_RAN: bool = false;
 
 struct Foo;
@@ -19,7 +17,7 @@ impl Trait for Foo {}
 
 pub fn main() {
     {
-        let _x: &Trait = &*(box Foo as Box<Trait>);
+        let _x: &Trait = &*(Box::new(Foo) as Box<Trait>);
     }
     unsafe {
         assert!(DROP_RAN);