diff options
| author | Andreas Molzer <andreas.molzer@gmx.de> | 2020-02-24 11:23:47 +0100 |
|---|---|---|
| committer | Andreas Molzer <andreas.molzer@gmx.de> | 2020-02-24 11:23:47 +0100 |
| commit | 329022dfad7199053cbe225e8d7d13ebbd5eb230 (patch) | |
| tree | 8ab48ec1f2417d9e731558d92a82c11409394043 | |
| parent | 99b4357f1763f7d98b9b78221207e09d075513b1 (diff) | |
| download | rust-329022dfad7199053cbe225e8d7d13ebbd5eb230.tar.gz rust-329022dfad7199053cbe225e8d7d13ebbd5eb230.zip | |
Address method comments
| -rw-r--r-- | src/libcore/cell.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 17222b27b2d..b6d5c6ae27d 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 } |
