1
Fork 0

rustc: Update how Gc<T> is recognized

This commit uses the same trick as ~/Box to map Gc<T> to @T internally inside
the compiler. This moves a number of implementations of traits to the `gc`
module in the standard library.

This removes functions such as `Gc::new`, `Gc::borrow`, and `Gc::ptr_eq` in
favor of the more modern equivalents, `box(GC)`, `Deref`, and pointer equality.

The Gc pointer itself should be much more useful now, and subsequent commits
will move the compiler away from @T towards Gc<T>

[breaking-change]
This commit is contained in:
Alex Crichton 2014-05-15 18:18:00 -07:00
parent ea41101b35
commit 531ed3d599
16 changed files with 155 additions and 173 deletions

View file

@ -135,6 +135,8 @@ extern crate rustrt;
#[cfg(test)] pub use realstd::ops;
#[cfg(test)] pub use realstd::cmp;
#[cfg(test)] pub use realstd::ty;
#[cfg(test)] pub use realstd::owned;
#[cfg(test)] pub use realstd::gc;
// NB: These reexports are in the order they should be listed in rustdoc
@ -219,6 +221,7 @@ pub mod rand;
pub mod ascii;
#[cfg(not(test))]
pub mod gc;
/* Common traits */