about summary refs log tree commit diff
path: root/src/libdebug
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-14 17:51:49 +0000
committerbors <bors@rust-lang.org>2014-06-14 17:51:49 +0000
commit6d8342f5e9f7093694548e761ee7df4f55243f3f (patch)
tree64606dac9c81ec4567e19f503d4d82e249dbf40a /src/libdebug
parentd64f18c490981f33f33e9c24e1ed1316e63f11fc (diff)
parentade807c6dcf6dc4454732c5e914ca06ebb429773 (diff)
downloadrust-6d8342f5e9f7093694548e761ee7df4f55243f3f.tar.gz
rust-6d8342f5e9f7093694548e761ee7df4f55243f3f.zip
auto merge of #14835 : alexcrichton/rust/no-more-at, r=brson
All functionality is now available through `Gc<T>` and `box(GC) expr`. This change also removes `GC` from the prelude (it's an experimental feature).
Diffstat (limited to 'src/libdebug')
-rw-r--r--src/libdebug/reflect.rs5
-rw-r--r--src/libdebug/repr.rs9
2 files changed, 8 insertions, 6 deletions
diff --git a/src/libdebug/reflect.rs b/src/libdebug/reflect.rs
index 3a12aec39a1..cd94829f354 100644
--- a/src/libdebug/reflect.rs
+++ b/src/libdebug/reflect.rs
@@ -18,6 +18,7 @@ Runtime type reflection
 
 use std::intrinsics::{Disr, Opaque, TyDesc, TyVisitor};
 use std::mem;
+use std::gc::Gc;
 
 /**
  * Trait for visitor that wishes to reflect on data.
@@ -219,9 +220,9 @@ impl<V:TyVisitor + MovePtr> TyVisitor for MovePtrAdaptor<V> {
     }
 
     fn visit_box(&mut self, mtbl: uint, inner: *TyDesc) -> bool {
-        self.align_to::<@u8>();
+        self.align_to::<Gc<u8>>();
         if ! self.inner.visit_box(mtbl, inner) { return false; }
-        self.bump_past::<@u8>();
+        self.bump_past::<Gc<u8>>();
         true
     }
 
diff --git a/src/libdebug/repr.rs b/src/libdebug/repr.rs
index 83eb4adfa97..d6ae23c6d9a 100644
--- a/src/libdebug/repr.rs
+++ b/src/libdebug/repr.rs
@@ -288,7 +288,7 @@ impl<'a> TyVisitor for ReprVisitor<'a> {
                         _align: uint) -> bool { fail!(); }
 
     fn visit_box(&mut self, mtbl: uint, inner: *TyDesc) -> bool {
-        try!(self, self.writer.write(['@' as u8]));
+        try!(self, self.writer.write("box(GC) ".as_bytes()));
         self.write_mut_qualifier(mtbl);
         self.get::<&raw::Box<()>>(|this, b| {
             let p = &b.data as *() as *u8;
@@ -591,6 +591,7 @@ fn test_repr() {
     use std::io::stdio::println;
     use std::char::is_alphabetic;
     use std::mem::swap;
+    use std::gc::GC;
 
     fn exact_test<T>(t: &T, e:&str) {
         let mut m = io::MemWriter::new();
@@ -605,7 +606,7 @@ fn test_repr() {
     exact_test(&1.234, "1.234f64");
     exact_test(&("hello"), "\"hello\"");
 
-    exact_test(&(@10), "@10");
+    exact_test(&(box(GC) 10), "box(GC) 10");
     exact_test(&(box 10), "box 10");
     exact_test(&(&10), "&10");
     let mut x = 10;
@@ -619,8 +620,8 @@ fn test_repr() {
                "&[\"hi\", \"there\"]");
     exact_test(&(P{a:10, b:1.234}),
                "repr::P{a: 10, b: 1.234f64}");
-    exact_test(&(@P{a:10, b:1.234}),
-               "@repr::P{a: 10, b: 1.234f64}");
+    exact_test(&(box(GC) P{a:10, b:1.234}),
+               "box(GC) repr::P{a: 10, b: 1.234f64}");
     exact_test(&(box P{a:10, b:1.234}),
                "box repr::P{a: 10, b: 1.234f64}");