about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-06-12 23:05:06 +0000
committerbors <bors@rust-lang.org>2015-06-12 23:05:06 +0000
commitc6b14833771d0254d189b368b5ab41b295e02fd1 (patch)
tree1564af22466c1f8f5d5cf8339df1347f21326738 /src/liballoc
parent50ab23ddbd39d797dde46288af0ae9d29784e7a3 (diff)
parent9d6ffbdaa8526595f5f18f0f3023d76193ce3267 (diff)
downloadrust-c6b14833771d0254d189b368b5ab41b295e02fd1.tar.gz
rust-c6b14833771d0254d189b368b5ab41b295e02fd1.zip
Auto merge of #26160 - alexcrichton:revert-rc-as-ref, r=aturon
This is a revert of PR #26008 which caused the unintended breakage reported in #26096. We may want to add these implementations in the long run, but for now this revert allows us to take some more time to evaluate the impact of such a change (e.g. run it through crater).

Closes #26096
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs9
-rw-r--r--src/liballoc/rc.rs10
2 files changed, 0 insertions, 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<T: ?Sized> Deref for Arc<T> {
     }
 }
 
-#[stable(feature = "rc_arc_as_ref", since = "1.2.0")]
-impl<T: ?Sized> AsRef<T> for Arc<T> {
-
-    #[inline]
-    fn as_ref(&self) -> &T {
-        &self.inner().data
-    }
-}
-
 impl<T: Clone> Arc<T> {
     /// Make a mutable reference from the given `Arc<T>`.
     ///
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<T: ?Sized> Deref for Rc<T> {
     }
 }
 
-#[stable(feature = "rc_arc_as_ref", since = "1.2.0")]
-impl<T: ?Sized> AsRef<T> for Rc<T> {
-
-    #[inline(always)]
-    fn as_ref(&self) -> &T {
-        &self.inner().value
-    }
-}
-
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: ?Sized> Drop for Rc<T> {
     /// Drops the `Rc<T>`.