]> git.lizzy.rs Git - rust.git/commit
rustc: Update how Gc<T> is recognized
authorAlex Crichton <alex@alexcrichton.com>
Fri, 16 May 2014 01:18:00 +0000 (18:18 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 11 Jun 2014 16:11:40 +0000 (09:11 -0700)
commit531ed3d599000de2517cba102c83fe44a1f1e252
treef6da0ce70539e996d6a533f78e699ab1434a9ede
parentea41101b3522f2a7d121758be489404cbb0fde5a
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]
16 files changed:
src/liballoc/rc.rs
src/libcollections/hash/mod.rs
src/libcore/clone.rs
src/libcore/cmp.rs
src/libcore/default.rs
src/libcore/fmt/mod.rs
src/libcore/raw.rs
src/librustc/middle/trans/expr.rs
src/librustc/middle/ty.rs
src/librustc/middle/typeck/astconv.rs
src/librustc/middle/typeck/check/mod.rs
src/librustc/middle/typeck/coherence.rs
src/librustc/util/ppaux.rs
src/libserialize/serialize.rs
src/libstd/gc.rs
src/libstd/lib.rs