diff options
| author | Andreas Molzer <andreas.molzer@gmx.de> | 2020-02-12 16:56:09 +0100 |
|---|---|---|
| committer | Andreas Molzer <andreas.molzer@gmx.de> | 2020-02-12 16:59:30 +0100 |
| commit | 99b4357f1763f7d98b9b78221207e09d075513b1 (patch) | |
| tree | a150ea6ba873ff3d98d696225bf9789450526e6b /src | |
| parent | 14999dd74b38ca79b80772f4f33425574faff89a (diff) | |
| download | rust-99b4357f1763f7d98b9b78221207e09d075513b1.tar.gz rust-99b4357f1763f7d98b9b78221207e09d075513b1.zip | |
Add tracking number, adjust documentation wording
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/cell.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index b1d799953e7..17222b27b2d 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -1249,8 +1249,9 @@ impl<'b, T: ?Sized> Ref<'b, T> { /// Convert into a reference to the underlying data. /// /// The underlying `RefCell` can never be mutably borrowed from again and will always appear - /// already immutably borrowed. It can still be immutably borrowed until more than `isize::MAX` - /// `Ref`s of this `RefCell` have been leaked, through this function or another leak, in total. + /// already immutably borrowed. It is not a good idea to leak more than a constant number of + /// references. The `RefCell` can be immutably borrowed again if only a smaller number of leaks + /// have occurred in total. /// /// This is an associated function that needs to be used as /// `Ref::leak(...)`. A method would interfere with methods of the @@ -1269,7 +1270,7 @@ impl<'b, T: ?Sized> Ref<'b, T> { /// assert!(cell.try_borrow().is_ok()); /// assert!(cell.try_borrow_mut().is_err()); /// ``` - #[unstable(feature = "cell_leak", issue = "none")] + #[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, @@ -1385,7 +1386,7 @@ impl<'b, T: ?Sized> RefMut<'b, T> { /// /// assert!(cell.try_borrow_mut().is_err()); /// ``` - #[unstable(feature = "cell_leak", issue = "none")] + #[unstable(feature = "cell_leak", issue = "69099")] pub fn leak(orig: RefMut<'b, T>) -> &'b mut 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, |
