Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>`.
///
Expand Down
10 changes: 0 additions & 10 deletions src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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>`.
Expand Down