about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-01-26 13:11:57 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-01-26 13:11:57 +0530
commit37b48edb5308a4d6559c7de533e8409b35da89ea (patch)
tree379fc83e295d535e4f6c2002a2d3b6d271263b29
parent74ef5aa45c09695cd3fe53edf6cdef083cca4b5c (diff)
parenta19353643bf9ad38dfa05fbea94c01b795989569 (diff)
Rollup merge of #31192 - frewsxcv:patch-27, r=alexcrichton
-rw-r--r--src/libcore/cell.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
index 789b75836d0..6041355e9db 100644
--- a/src/libcore/cell.rs
+++ b/src/libcore/cell.rs
@@ -414,7 +414,9 @@ impl<T: ?Sized> RefCell<T> {
     ///
     /// let c = RefCell::new(5);
     ///
-    /// let borrowed_five = c.borrow_mut();
+    /// *c.borrow_mut() = 7;
+    ///
+    /// assert_eq!(*c.borrow(), 7);
     /// ```
     ///
     /// An example of panic: