diff options
| author | bors <bors@rust-lang.org> | 2014-10-03 05:02:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-03 05:02:37 +0000 |
| commit | aa034cd3bac3155e0f6c74c399314b5ee32f88fc (patch) | |
| tree | 891acff8f9158a69e1884707ca3bfb70d749db2e /src/libdebug | |
| parent | d0af3feebb57bc58c52de69ab51f92dc7082500b (diff) | |
| parent | d911936dbdc645133ad9605f45d2bf10b73e2b20 (diff) | |
| download | rust-aa034cd3bac3155e0f6c74c399314b5ee32f88fc.tar.gz rust-aa034cd3bac3155e0f6c74c399314b5ee32f88fc.zip | |
auto merge of #17725 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libdebug')
| -rw-r--r-- | src/libdebug/lib.rs | 2 | ||||
| -rw-r--r-- | src/libdebug/reflect.rs | 5 | ||||
| -rw-r--r-- | src/libdebug/repr.rs | 14 |
3 files changed, 6 insertions, 15 deletions
diff --git a/src/libdebug/lib.rs b/src/libdebug/lib.rs index 6341a380563..21abfae8be9 100644 --- a/src/libdebug/lib.rs +++ b/src/libdebug/lib.rs @@ -25,7 +25,7 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/master/")] #![experimental] -#![feature(managed_boxes, macro_rules)] +#![feature(macro_rules)] #![allow(experimental)] pub mod fmt; diff --git a/src/libdebug/reflect.rs b/src/libdebug/reflect.rs index 80d0f8a8794..1e771a2b40a 100644 --- a/src/libdebug/reflect.rs +++ b/src/libdebug/reflect.rs @@ -18,7 +18,6 @@ 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. @@ -194,9 +193,9 @@ impl<V:TyVisitor + MovePtr> TyVisitor for MovePtrAdaptor<V> { } fn visit_box(&mut self, mtbl: uint, inner: *const TyDesc) -> bool { - self.align_to::<Gc<u8>>(); + self.align_to::<Box<u8>>(); if ! self.inner.visit_box(mtbl, inner) { return false; } - self.bump_past::<Gc<u8>>(); + self.bump_past::<Box<u8>>(); true } diff --git a/src/libdebug/repr.rs b/src/libdebug/repr.rs index 5fbba286fea..e27816c8165 100644 --- a/src/libdebug/repr.rs +++ b/src/libdebug/repr.rs @@ -274,13 +274,9 @@ impl<'a> TyVisitor for ReprVisitor<'a> { self.get::<&str>(|this, s| this.write_escaped_slice(*s)) } - fn visit_box(&mut self, mtbl: uint, inner: *const TyDesc) -> bool { - try!(self, self.writer.write("box(GC) ".as_bytes())); - self.write_mut_qualifier(mtbl); - self.get::<&raw::GcBox<()>>(|this, b| { - let p = &b.data as *const () as *const u8; - this.visit_ptr_inner(p, inner) - }) + fn visit_box(&mut self, _mtbl: uint, _inner: *const TyDesc) -> bool { + try!(self, self.writer.write("box(GC) ???".as_bytes())); + true } fn visit_uniq(&mut self, _mtbl: uint, inner: *const TyDesc) -> bool { @@ -576,7 +572,6 @@ 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(); @@ -591,7 +586,6 @@ fn test_repr() { exact_test(&1.234f64, "1.234f64"); exact_test(&("hello"), "\"hello\""); - exact_test(&(box(GC) 10i), "box(GC) 10"); exact_test(&(box 10i), "box 10"); exact_test(&(&10i), "&10"); let mut x = 10i; @@ -605,8 +599,6 @@ fn test_repr() { "&[\"hi\", \"there\"]"); 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}"); |
