Make explanations of cross-references between make_mut and get_mut more accurate

This commit is contained in:
Frank Steffahn 2021-08-24 21:34:12 +02:00
parent 335bf7ca6b
commit 90354c719a
2 changed files with 6 additions and 4 deletions

View file

@ -1011,7 +1011,7 @@ impl<T: ?Sized> Rc<T> {
/// 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<T: Clone> Rc<T> {
/// 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

View file

@ -1354,7 +1354,8 @@ impl<T: Clone> Arc<T> {
/// 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<T: ?Sized> Arc<T> {
/// 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