diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 65f5ed06254..ce160eec103 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -779,26 +779,12 @@ trait RcBoxPtr { impl RcBoxPtr for Rc { #[inline(always)] - fn inner(&self) -> &RcBox { - unsafe { - // Safe to assume this here, as if it weren't true, we'd be breaking - // the contract anyway - assume(!self._ptr.is_null()); - &(**self._ptr) - } - } + fn inner(&self) -> &RcBox { unsafe { &(**self._ptr) } } } impl RcBoxPtr for Weak { #[inline(always)] - fn inner(&self) -> &RcBox { - unsafe { - // Safe to assume this here, as if it weren't true, we'd be breaking - // the contract anyway - assume(!self._ptr.is_null()); - &(**self._ptr) - } - } + fn inner(&self) -> &RcBox { unsafe { &(**self._ptr) } } } #[cfg(test)]