From 9d6ffbdaa8526595f5f18f0f3023d76193ce3267 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 9 Jun 2015 16:47:45 -0700 Subject: [PATCH] Revert "Added AsRef implementations for Arc and Rc" This reverts commit 7f3ae0aa26d24100379ae0f3eef29916a32f4e79. --- src/liballoc/arc.rs | 9 --------- src/liballoc/rc.rs | 10 ---------- 2 files changed, 19 deletions(-) diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 990a73c53ae..616071f0df7 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -330,15 +330,6 @@ impl Deref for Arc { } } -#[stable(feature = "rc_arc_as_ref", since = "1.2.0")] -impl AsRef for Arc { - - #[inline] - fn as_ref(&self) -> &T { - &self.inner().data - } -} - impl Arc { /// Make a mutable reference from the given `Arc`. /// diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 906a41a4d53..44f4a6a6290 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -156,7 +156,6 @@ use std::boxed; use core::cell::Cell; use core::clone::Clone; use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering}; -use core::convert::AsRef; use core::default::Default; use core::fmt; use core::hash::{Hasher, Hash}; @@ -380,15 +379,6 @@ impl Deref for Rc { } } -#[stable(feature = "rc_arc_as_ref", since = "1.2.0")] -impl AsRef for Rc { - - #[inline(always)] - fn as_ref(&self) -> &T { - &self.inner().value - } -} - #[stable(feature = "rust1", since = "1.0.0")] impl Drop for Rc { /// Drops the `Rc`.