From 329022dfad7199053cbe225e8d7d13ebbd5eb230 Mon Sep 17 00:00:00 2001 From: Andreas Molzer Date: Mon, 24 Feb 2020 11:23:47 +0100 Subject: [PATCH] Address method comments --- src/libcore/cell.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 17222b27b2d7..b6d5c6ae27db 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -1272,9 +1272,8 @@ impl<'b, T: ?Sized> Ref<'b, T> { /// ``` #[unstable(feature = "cell_leak", issue = "69099")] pub fn leak(orig: Ref<'b, T>) -> &'b T { - // By forgetting this BorrowRefMut we ensure that the borrow counter in the RefCell never - // goes back to UNUSED again. No further references can be created from the original cell, - // making the current borrow the only reference for the remaining lifetime. + // By forgetting this Ref we ensure that the borrow counter in the RefCell never goes back + // to UNUSED again. No further mutable references can be created from the original cell. mem::forget(orig.borrow); orig.value }