about summary refs log tree commit diff
path: root/src/test/compile-fail/borrowck-lend-flow-if.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/borrowck-lend-flow-if.rs')
-rw-r--r--src/test/compile-fail/borrowck-lend-flow-if.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/compile-fail/borrowck-lend-flow-if.rs b/src/test/compile-fail/borrowck-lend-flow-if.rs
index 80b8770397f..b1ba057dc14 100644
--- a/src/test/compile-fail/borrowck-lend-flow-if.rs
+++ b/src/test/compile-fail/borrowck-lend-flow-if.rs
@@ -14,21 +14,22 @@
 // either genuine or would require more advanced changes.  The latter
 // cases are noted.
 
+
 fn borrow(_v: &int) {}
 fn borrow_mut(_v: &mut int) {}
 fn cond() -> bool { fail!() }
 fn for_func(_f: || -> bool) { fail!() }
 fn produce<T>() -> T { fail!(); }
 
-fn inc(v: &mut ~int) {
-    *v = ~(**v + 1);
+fn inc(v: &mut Box<int>) {
+    *v = box() (**v + 1);
 }
 
 fn pre_freeze_cond() {
     // In this instance, the freeze is conditional and starts before
     // the mut borrow.
 
-    let mut v = ~3;
+    let mut v = box 3;
     let _w;
     if cond() {
         _w = &v;
@@ -40,7 +41,7 @@ fn pre_freeze_else() {
     // In this instance, the freeze and mut borrow are on separate sides
     // of the if.
 
-    let mut v = ~3;
+    let mut v = box 3;
     let _w;
     if cond() {
         _w = &v;