Skip to content

Commit f8a180b

Browse files
committed
Rename raw::Box to raw::GcBox
Fixes rust-lang#17470.
1 parent 5d653c1 commit f8a180b

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

Diff for: src/liballoc/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use core::raw;
1616
#[inline]
1717
#[deprecated]
1818
pub fn get_box_size(body_size: uint, body_align: uint) -> uint {
19-
let header_size = mem::size_of::<raw::Box<()>>();
19+
let header_size = mem::size_of::<raw::GcBox<()>>();
2020
let total_size = align_to(header_size, body_align) + body_size;
2121
total_size
2222
}

Diff for: src/libcore/raw.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
2121
use mem;
2222

23-
/// The representation of a Rust managed box
24-
pub struct Box<T> {
23+
/// The representation of `std::gc::Gc`.
24+
pub struct GcBox<T> {
2525
pub ref_count: uint,
2626
pub drop_glue: fn(ptr: *mut u8),
27-
pub prev: *mut Box<T>,
28-
pub next: *mut Box<T>,
27+
pub prev: *mut GcBox<T>,
28+
pub next: *mut GcBox<T>,
2929
pub data: T,
3030
}
3131

Diff for: src/libdebug/repr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ impl<'a> TyVisitor for ReprVisitor<'a> {
277277
fn visit_box(&mut self, mtbl: uint, inner: *const TyDesc) -> bool {
278278
try!(self, self.writer.write("box(GC) ".as_bytes()));
279279
self.write_mut_qualifier(mtbl);
280-
self.get::<&raw::Box<()>>(|this, b| {
280+
self.get::<&raw::GcBox<()>>(|this, b| {
281281
let p = &b.data as *const () as *const u8;
282282
this.visit_ptr_inner(p, inner)
283283
})

Diff for: src/librustrt/local_heap.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ use task::Task;
2424

2525
static RC_IMMORTAL : uint = 0x77777777;
2626

27-
pub type Box = raw::Box<()>;
27+
pub type Box = raw::GcBox<()>;
2828

2929
pub struct MemoryRegion {
3030
live_allocations: uint,
3131
}
3232

3333
pub struct LocalHeap {
3434
memory_region: MemoryRegion,
35-
live_allocs: *mut raw::Box<()>,
35+
live_allocs: *mut raw::GcBox<()>,
3636
}
3737

3838
impl LocalHeap {
@@ -161,7 +161,7 @@ impl LocalHeap {
161161
}
162162

163163
unsafe fn each_live_alloc(&mut self, read_next_before: bool,
164-
f: |&mut LocalHeap, alloc: *mut raw::Box<()>|) {
164+
f: |&mut LocalHeap, alloc: *mut raw::GcBox<()>|) {
165165
//! Walks the internal list of allocations
166166
167167
let mut alloc = self.live_allocs;

Diff for: src/libstd/gc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl<T: Default + 'static> Default for Gc<T> {
8989
}
9090
}
9191

92-
impl<T: 'static> raw::Repr<*const raw::Box<T>> for Gc<T> {}
92+
impl<T: 'static> raw::Repr<*const raw::GcBox<T>> for Gc<T> {}
9393

9494
impl<S: hash::Writer, T: hash::Hash<S> + 'static> hash::Hash<S> for Gc<T> {
9595
fn hash(&self, s: &mut S) {

0 commit comments

Comments
 (0)