about summary refs log tree commit diff
path: root/src/libcore/cell.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/cell.rs')
-rw-r--r--src/libcore/cell.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
index fad3095f8a3..c4c1d2824b0 100644
--- a/src/libcore/cell.rs
+++ b/src/libcore/cell.rs
@@ -849,11 +849,11 @@ impl<T: ?Sized> RefCell<T> {
     /// ```
     /// use std::cell::RefCell;
     ///
-    /// let c = RefCell::new(5);
+    /// let c = RefCell::new("hello".to_owned());
     ///
-    /// *c.borrow_mut() = 7;
+    /// *c.borrow_mut() = "bonjour".to_owned();
     ///
-    /// assert_eq!(*c.borrow(), 7);
+    /// assert_eq!(&*c.borrow(), "bonjour");
     /// ```
     ///
     /// An example of panic: