summaryrefslogtreecommitdiffstats
path: root/src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs')
-rw-r--r--src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs b/src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs
index fb2b4d476..dfc094abe 100644
--- a/src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs
+++ b/src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs
@@ -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);