Skip to content

Commit 99b4357

Browse files
committed
Add tracking number, adjust documentation wording
1 parent 14999dd commit 99b4357

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/libcore/cell.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,8 +1249,9 @@ impl<'b, T: ?Sized> Ref<'b, T> {
12491249
/// Convert into a reference to the underlying data.
12501250
///
12511251
/// The underlying `RefCell` can never be mutably borrowed from again and will always appear
1252-
/// already immutably borrowed. It can still be immutably borrowed until more than `isize::MAX`
1253-
/// `Ref`s of this `RefCell` have been leaked, through this function or another leak, in total.
1252+
/// already immutably borrowed. It is not a good idea to leak more than a constant number of
1253+
/// references. The `RefCell` can be immutably borrowed again if only a smaller number of leaks
1254+
/// have occurred in total.
12541255
///
12551256
/// This is an associated function that needs to be used as
12561257
/// `Ref::leak(...)`. A method would interfere with methods of the
@@ -1269,7 +1270,7 @@ impl<'b, T: ?Sized> Ref<'b, T> {
12691270
/// assert!(cell.try_borrow().is_ok());
12701271
/// assert!(cell.try_borrow_mut().is_err());
12711272
/// ```
1272-
#[unstable(feature = "cell_leak", issue = "none")]
1273+
#[unstable(feature = "cell_leak", issue = "69099")]
12731274
pub fn leak(orig: Ref<'b, T>) -> &'b T {
12741275
// By forgetting this BorrowRefMut we ensure that the borrow counter in the RefCell never
12751276
// 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> {
13851386
///
13861387
/// assert!(cell.try_borrow_mut().is_err());
13871388
/// ```
1388-
#[unstable(feature = "cell_leak", issue = "none")]
1389+
#[unstable(feature = "cell_leak", issue = "69099")]
13891390
pub fn leak(orig: RefMut<'b, T>) -> &'b mut T {
13901391
// By forgetting this BorrowRefMut we ensure that the borrow counter in the RefCell never
13911392
// goes back to UNUSED again. No further references can be created from the original cell,

0 commit comments

Comments
 (0)