about summary refs log tree commit diff
path: root/src/liballoc/rc.rs
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2015-02-18 23:50:21 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2015-02-18 23:50:21 +1100
commitdfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5 (patch)
treee9c32f2e58b3462a23dd9c472d2f236640b78811 /src/liballoc/rc.rs
parent6c065fc8cb036785f61ff03e05c1563cbb2dd081 (diff)
parent47f91a9484eceef10536d4caac6ef578cd254567 (diff)
Manual merge of #22475 - alexcrichton:rollup, r=alexcrichton
 One windows bot failed spuriously.
Diffstat (limited to 'src/liballoc/rc.rs')
-rw-r--r--src/liballoc/rc.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index ab3c0901bc9..f361c36ec8f 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -170,7 +170,7 @@ struct RcBox<T> {
     weak: Cell<usize>
 }
 
-/// An immutable reference-counted pointer type.
+/// A reference-counted pointer type over an immutable value.
 ///
 /// See the [module level documentation](./index.html) for more details.
 #[unsafe_no_drop_flag]
@@ -776,9 +776,7 @@ impl<T> RcBoxPtr<T> for Rc<T> {
             // the contract anyway.
             // This allows the null check to be elided in the destructor if we
             // manipulated the reference count in the same function.
-            if cfg!(not(stage0)) { // NOTE remove cfg after next snapshot
-                assume(!self._ptr.is_null());
-            }
+            assume(!self._ptr.is_null());
             &(**self._ptr)
         }
     }
@@ -792,9 +790,7 @@ impl<T> RcBoxPtr<T> for Weak<T> {
             // the contract anyway.
             // This allows the null check to be elided in the destructor if we
             // manipulated the reference count in the same function.
-            if cfg!(not(stage0)) { // NOTE remove cfg after next snapshot
-                assume(!self._ptr.is_null());
-            }
+            assume(!self._ptr.is_null());
             &(**self._ptr)
         }
     }