about summary refs log tree commit diff
path: root/src/test/compile-fail/borrowck-preserve-cond-box.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/borrowck-preserve-cond-box.rs')
-rw-r--r--src/test/compile-fail/borrowck-preserve-cond-box.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/test/compile-fail/borrowck-preserve-cond-box.rs b/src/test/compile-fail/borrowck-preserve-cond-box.rs
index 7000e2351dd..e1641f54a6c 100644
--- a/src/test/compile-fail/borrowck-preserve-cond-box.rs
+++ b/src/test/compile-fail/borrowck-preserve-cond-box.rs
@@ -12,9 +12,11 @@
 
 #![feature(managed_boxes)]
 
+use std::gc::GC;
+
 fn testfn(cond: bool) {
-    let mut x = @3;
-    let mut y = @4;
+    let mut x = box(GC) 3;
+    let mut y = box(GC) 4;
 
     // borrow x and y
     let r_x = &*x;
@@ -30,13 +32,13 @@ fn testfn(cond: bool) {
     println!("*r = {}, exp = {}", *r, exp);
     assert_eq!(*r, exp);
 
-    x = @5; //~ERROR cannot assign to `x` because it is borrowed
-    y = @6; //~ERROR cannot assign to `y` because it is borrowed
+    x = box(GC) 5; //~ERROR cannot assign to `x` because it is borrowed
+    y = box(GC) 6; //~ERROR cannot assign to `y` because it is borrowed
 
     println!("*r = {}, exp = {}", *r, exp);
     assert_eq!(*r, exp);
-    assert_eq!(x, @5);
-    assert_eq!(y, @6);
+    assert_eq!(x, box(GC) 5);
+    assert_eq!(y, box(GC) 6);
 }
 
 pub fn main() {