From 90354c719a94db7d393134c00b2a91bd651b5e7a Mon Sep 17 00:00:00 2001 From: Frank Steffahn Date: Tue, 24 Aug 2021 21:34:12 +0200 Subject: [PATCH] Make explanations of cross-references between `make_mut` and `get_mut` more accurate --- library/alloc/src/rc.rs | 5 +++-- library/alloc/src/sync.rs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 272fc119f4edd..a9d147fa1a55c 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -1011,7 +1011,7 @@ impl Rc { /// mutate a shared value. /// /// See also [`make_mut`][make_mut], which will [`clone`][clone] - /// the inner value when there are other pointers. + /// the inner value when there are other `Rc` pointers. /// /// [make_mut]: Rc::make_mut /// [clone]: Clone::clone @@ -1104,7 +1104,8 @@ impl Rc { /// pointers, then the [`Weak`] pointers will be disassociated and the inner value will not /// be cloned. /// - /// See also [`get_mut`], which will fail rather than cloning. + /// See also [`get_mut`], which will fail rather than cloning the inner value + /// or diassociating [`Weak`] pointers. /// /// [`clone`]: Clone::clone /// [`get_mut`]: Rc::get_mut diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 2367eaec4b938..a066e0b49e25c 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -1354,7 +1354,8 @@ impl Arc { /// pointers, then the [`Weak`] pointers will be disassociated and the inner value will not /// be cloned. /// - /// See also [`get_mut`], which will fail rather than cloning. + /// See also [`get_mut`], which will fail rather than cloning the inner value + /// or diassociating [`Weak`] pointers. /// /// [`clone`]: Clone::clone /// [`get_mut`]: Arc::get_mut @@ -1458,7 +1459,7 @@ impl Arc { /// mutate a shared value. /// /// See also [`make_mut`][make_mut], which will [`clone`][clone] - /// the inner value when there are other pointers. + /// the inner value when there are other `Arc` pointers. /// /// [make_mut]: Arc::make_mut /// [clone]: Clone::clone