diff options
Diffstat (limited to 'src/libstd/gc.rs')
| -rw-r--r-- | src/libstd/gc.rs | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/libstd/gc.rs b/src/libstd/gc.rs index fa7c94ac994..907a2d21b69 100644 --- a/src/libstd/gc.rs +++ b/src/libstd/gc.rs @@ -19,8 +19,7 @@ collector is task-local so `Gc<T>` is not sendable. #[allow(experimental)]; use kinds::marker; -use kinds::Send; -use clone::{Clone, DeepClone}; +use clone::Clone; use managed; /// Immutable garbage-collected pointer type @@ -78,16 +77,6 @@ pub static GC: () = (); #[cfg(test)] pub static GC: () = (); -/// The `Send` bound restricts this to acyclic graphs where it is well-defined. -/// -/// A `Freeze` bound would also work, but `Send` *or* `Freeze` cannot be expressed. -impl<T: DeepClone + Send + 'static> DeepClone for Gc<T> { - #[inline] - fn deep_clone(&self) -> Gc<T> { - Gc::new(self.borrow().deep_clone()) - } -} - #[cfg(test)] mod tests { use prelude::*; @@ -105,16 +94,6 @@ mod tests { } #[test] - fn test_deep_clone() { - let x = Gc::new(RefCell::new(5)); - let y = x.deep_clone(); - x.borrow().with_mut(|inner| { - *inner = 20; - }); - assert_eq!(y.borrow().with(|x| *x), 5); - } - - #[test] fn test_simple() { let x = Gc::new(5); assert_eq!(*x.borrow(), 5); |
