about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs6
-rw-r--r--src/liballoc/boxed.rs4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index cc6f2d76eaf..f543826fe01 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -227,9 +227,9 @@ impl<T: Sync + Send> Drop for Arc<T> {
 impl<T: Sync + Send> Weak<T> {
     /// Attempts to upgrade this weak reference to a strong reference.
     ///
-    /// This method will fail to upgrade this reference if the strong reference
-    /// count has already reached 0, but if there are still other active strong
-    /// references this function will return a new strong reference to the data.
+    /// This method will not upgrade this reference if the strong reference count has already
+    /// reached 0, but if there are still other active strong references this function will return
+    /// a new strong reference to the data.
     pub fn upgrade(&self) -> Option<Arc<T>> {
         // We use a CAS loop to increment the strong count instead of a
         // fetch_add because once the count hits 0 is must never be above 0.
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 168d0daeb38..09404af7027 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -148,11 +148,11 @@ mod test {
 
         match a.downcast::<uint>() {
             Ok(a) => { assert!(a == box 8u); }
-            Err(..) => fail!()
+            Err(..) => panic!()
         }
         match b.downcast::<Test>() {
             Ok(a) => { assert!(a == box Test); }
-            Err(..) => fail!()
+            Err(..) => panic!()
         }
 
         let a = box 8u as Box<Any>;