summary refs log tree commit diff
path: root/src/test/pretty
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-12-31 15:46:27 -0800
committerPatrick Walton <pcwalton@mimiga.net>2014-01-03 14:02:01 -0800
commitc3694d732ef9ed641671fbf116d183e78dc4e90a (patch)
tree9491998229d82615ae8d547ff4061e433947b373 /src/test/pretty
parentdf13c64c3b221f0408fa7e149884e25ff5b02343 (diff)
downloadrust-c3694d732ef9ed641671fbf116d183e78dc4e90a.tar.gz
rust-c3694d732ef9ed641671fbf116d183e78dc4e90a.zip
test: De-`@mut` the test suite
Diffstat (limited to 'src/test/pretty')
-rw-r--r--src/test/pretty/block-disambig.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/test/pretty/block-disambig.rs b/src/test/pretty/block-disambig.rs
index 8d6eaef8b34..3f789fa456a 100644
--- a/src/test/pretty/block-disambig.rs
+++ b/src/test/pretty/block-disambig.rs
@@ -14,6 +14,8 @@
 
 #[feature(managed_boxes)];
 
+use std::cell::Cell;
+
 fn test1() { let val = @0; { } *val; }
 
 fn test2() -> int { let val = @0; { } *val }
@@ -21,9 +23,9 @@ fn test2() -> int { let val = @0; { } *val }
 struct S { eax: int }
 
 fn test3() {
-    let regs = @mut S {eax: 0};
+    let regs = @Cell::new(S {eax: 0});
     match true { true => { } _ => { } }
-    (*regs).eax = 1;
+    regs.set(S {eax: 1});
 }
 
 fn test4() -> bool { let regs = @true; if true { } *regs || false }
@@ -51,10 +53,13 @@ fn test8() -> int {
     }
 }
 
-fn test9() { let regs = @mut 0; match true { true => { } _ => { } } *regs += 1; }
+fn test9() {
+    let regs = @Cell::new(0);
+    match true { true => { } _ => { } } regs.set(regs.get() + 1);
+}
 
 fn test10() -> int {
-    let regs = @mut ~[0];
+    let regs = @~[0];
     match true { true => { } _ => { } }
     (*regs)[0]
 }