Skip to content

Commit 329022d

Browse files
committed
Address method comments
1 parent 99b4357 commit 329022d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/libcore/cell.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1272,9 +1272,8 @@ impl<'b, T: ?Sized> Ref<'b, T> {
12721272
/// ```
12731273
#[unstable(feature = "cell_leak", issue = "69099")]
12741274
pub fn leak(orig: Ref<'b, T>) -> &'b T {
1275-
// By forgetting this BorrowRefMut we ensure that the borrow counter in the RefCell never
1276-
// goes back to UNUSED again. No further references can be created from the original cell,
1277-
// making the current borrow the only reference for the remaining lifetime.
1275+
// By forgetting this Ref we ensure that the borrow counter in the RefCell never goes back
1276+
// to UNUSED again. No further mutable references can be created from the original cell.
12781277
mem::forget(orig.borrow);
12791278
orig.value
12801279
}

0 commit comments

Comments
 (0)