Skip to content

Commit 37b48ed

Browse files
committed
Rollup merge of #31192 - frewsxcv:patch-27, r=alexcrichton
2 parents 74ef5aa + a193536 commit 37b48ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libcore/cell.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,9 @@ impl<T: ?Sized> RefCell<T> {
414414
///
415415
/// let c = RefCell::new(5);
416416
///
417-
/// let borrowed_five = c.borrow_mut();
417+
/// *c.borrow_mut() = 7;
418+
///
419+
/// assert_eq!(*c.borrow(), 7);
418420
/// ```
419421
///
420422
/// An example of panic:

0 commit comments

Comments
 (0)