From 531ed3d599000de2517cba102c83fe44a1f1e252 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 15 May 2014 18:18:00 -0700 Subject: rustc: Update how Gc is recognized This commit uses the same trick as ~/Box to map Gc 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 [breaking-change] --- src/liballoc/rc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/liballoc') diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 416a6ad2d8b..8b28ab917b3 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -320,8 +320,8 @@ mod tests { #[test] fn gc_inside() { // see issue #11532 - use std::gc::Gc; - let a = Rc::new(RefCell::new(Gc::new(1))); + use realstd::gc::Gc; + let a = Rc::new(RefCell::new(box(GC) 1)); assert!(a.try_borrow_mut().is_some()); } -- cgit 1.4.1-3-g733a5