about summary refs log tree commit diff
path: root/src/test/compile-fail/autoderef-full-lval.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/autoderef-full-lval.rs')
-rw-r--r--src/test/compile-fail/autoderef-full-lval.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/test/compile-fail/autoderef-full-lval.rs b/src/test/compile-fail/autoderef-full-lval.rs
index 3bb66e3b099..f4b410d3031 100644
--- a/src/test/compile-fail/autoderef-full-lval.rs
+++ b/src/test/compile-fail/autoderef-full-lval.rs
@@ -12,23 +12,25 @@
 
 extern crate debug;
 
+use std::gc::{Gc, GC};
+
 struct clam {
-    x: @int,
-    y: @int,
+    x: Gc<int>,
+    y: Gc<int>,
 }
 
 struct fish {
-    a: @int,
+    a: Gc<int>,
 }
 
 fn main() {
-    let a: clam = clam{x: @1, y: @2};
-    let b: clam = clam{x: @10, y: @20};
+    let a: clam = clam{x: box(GC) 1, y: box(GC) 2};
+    let b: clam = clam{x: box(GC) 10, y: box(GC) 20};
     let z: int = a.x + b.y; //~ ERROR binary operation `+` cannot be applied to type `@int`
     println!("{:?}", z);
     assert_eq!(z, 21);
-    let forty: fish = fish{a: @40};
-    let two: fish = fish{a: @2};
+    let forty: fish = fish{a: box(GC) 40};
+    let two: fish = fish{a: box(GC) 2};
     let answer: int = forty.a + two.a;
     //~^ ERROR binary operation `+` cannot be applied to type `@int`
     println!("{:?}", answer);