/// ```
#[inline]
#[unstable(feature = "alloc")]
-pub fn get_mut<'a, T>(rc: &'a mut Rc<T>) -> Option<&'a mut T> {
+pub fn get_mut<T>(rc: &mut Rc<T>) -> Option<&mut T> {
if is_unique(rc) {
let inner = unsafe { &mut **rc._ptr };
Some(&mut inner.value)
///
/// ```
/// use std::rc::Rc;
- /// use std::default::Default;
///
/// let x: Rc<i32> = Default::default();
/// ```
}
}
+#[stable(feature = "rust1", since = "1.0.0")]
+impl<T> fmt::Pointer for Rc<T> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fmt::Pointer::fmt(&*self._ptr, f)
+ }
+}
+
/// A weak version of `Rc<T>`.
///
/// Weak references do not count when determining if the inner value should be