about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/util/ppaux.rs4
-rw-r--r--src/test/compile-fail/autoderef-full-lval.rs4
-rw-r--r--src/test/compile-fail/issue-14915.rs21
-rw-r--r--src/test/compile-fail/issue-7013.rs2
-rw-r--r--src/test/compile-fail/issue-7061.rs2
-rw-r--r--src/test/compile-fail/regions-infer-paramd-indirect.rs2
6 files changed, 28 insertions, 7 deletions
diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs
index aac0b12e46f..ac8ca05f8d0 100644
--- a/src/librustc/util/ppaux.rs
+++ b/src/librustc/util/ppaux.rs
@@ -351,8 +351,8 @@ pub fn ty_to_str(cx: &ctxt, typ: t) -> String {
       ty_uint(t) => ast_util::uint_ty_to_str(t, None,
                                              ast_util::AutoSuffix).to_string(),
       ty_float(t) => ast_util::float_ty_to_str(t).to_string(),
-      ty_box(typ) => format!("@{}", ty_to_str(cx, typ)),
-      ty_uniq(typ) => format!("~{}", ty_to_str(cx, typ)),
+      ty_box(typ) => format!("Gc<{}>", ty_to_str(cx, typ)),
+      ty_uniq(typ) => format!("Box<{}>", ty_to_str(cx, typ)),
       ty_ptr(ref tm) => format!("*{}", mt_to_str(cx, tm)),
       ty_rptr(r, ref tm) => {
           let mut buf = region_ptr_to_str(cx, r);
diff --git a/src/test/compile-fail/autoderef-full-lval.rs b/src/test/compile-fail/autoderef-full-lval.rs
index f4b410d3031..dd928bfa9d4 100644
--- a/src/test/compile-fail/autoderef-full-lval.rs
+++ b/src/test/compile-fail/autoderef-full-lval.rs
@@ -26,13 +26,13 @@ struct fish {
 fn main() {
     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`
+    let z: int = a.x + b.y; //~ ERROR binary operation `+` cannot be applied to type `Gc<int>`
     println!("{:?}", z);
     assert_eq!(z, 21);
     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`
+    //~^ ERROR binary operation `+` cannot be applied to type `Gc<int>`
     println!("{:?}", answer);
     assert_eq!(answer, 42);
 }
diff --git a/src/test/compile-fail/issue-14915.rs b/src/test/compile-fail/issue-14915.rs
new file mode 100644
index 00000000000..e24830907d3
--- /dev/null
+++ b/src/test/compile-fail/issue-14915.rs
@@ -0,0 +1,21 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::gc::{GC,Gc};
+
+fn main() {
+    let x: Box<int> = box 0;
+    let y: Gc<int> = box (GC) 0;
+
+    println!("{}", x + 1); //~ ERROR binary operation `+` cannot be applied to type `Box<int>`
+    //~^ ERROR cannot determine a type for this bounded type parameter: unconstrained type
+    println!("{}", y + 1);
+    //~^ ERROR binary operation `+` cannot be applied to type `Gc<int>`
+}
diff --git a/src/test/compile-fail/issue-7013.rs b/src/test/compile-fail/issue-7013.rs
index bff8ba629aa..ea332c1e252 100644
--- a/src/test/compile-fail/issue-7013.rs
+++ b/src/test/compile-fail/issue-7013.rs
@@ -32,7 +32,7 @@ struct A {
 
 fn main() {
     let a = A {v: box B{v: None} as Box<Foo+Send>};
-    //~^ ERROR cannot pack type `~B`, which does not fulfill `Send`
+    //~^ ERROR cannot pack type `Box<B>`, which does not fulfill `Send`
     let v = Rc::new(RefCell::new(a));
     let w = v.clone();
     let b = &*v;
diff --git a/src/test/compile-fail/issue-7061.rs b/src/test/compile-fail/issue-7061.rs
index b05bff20825..b644d98926c 100644
--- a/src/test/compile-fail/issue-7061.rs
+++ b/src/test/compile-fail/issue-7061.rs
@@ -16,7 +16,7 @@ struct BarStruct;
 
 impl<'a> BarStruct {
     fn foo(&'a mut self) -> Gc<BarStruct> { self }
-    //~^ ERROR: error: mismatched types: expected `@BarStruct` but found `&'a mut BarStruct
+    //~^ ERROR: error: mismatched types: expected `Gc<BarStruct>` but found `&'a mut BarStruct
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/regions-infer-paramd-indirect.rs b/src/test/compile-fail/regions-infer-paramd-indirect.rs
index b5b89ebcc2f..ea2e6feba57 100644
--- a/src/test/compile-fail/regions-infer-paramd-indirect.rs
+++ b/src/test/compile-fail/regions-infer-paramd-indirect.rs
@@ -33,7 +33,7 @@ impl<'a> set_f<'a> for c<'a> {
     }
 
     fn set_f_bad(&self, b: Gc<b>) {
-        self.f = b; //~ ERROR mismatched types: expected `@@&'a int` but found `@@&int`
+        self.f = b; //~ ERROR mismatched types: expected `Gc<Gc<&'a int>>` but found `Gc<Gc<&int>>`
         //~^ ERROR cannot infer
     }
 }