From 303203f992088d05d930b2d7e4bb826c2b611a53 Mon Sep 17 00:00:00 2001 From: Frank Steffahn Date: Mon, 28 Dec 2020 16:59:36 +0100 Subject: [PATCH] Mention Arc::make_mut and Rc::make_mut in the documentation of Cow --- library/alloc/src/borrow.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/alloc/src/borrow.rs b/library/alloc/src/borrow.rs index f801c1ac75b..adf996fc782 100644 --- a/library/alloc/src/borrow.rs +++ b/library/alloc/src/borrow.rs @@ -103,6 +103,11 @@ fn clone_into(&self, target: &mut T) { /// is desired, `to_mut` will obtain a mutable reference to an owned /// value, cloning if necessary. /// +/// If you need reference-counting pointers, note that +/// [`Rc::make_mut`][crate::rc::Rc::make_mut] and +/// [`Arc::make_mut`][crate::sync::Arc::make_mut] can provide clone-on-write +/// functionality as well. +/// /// # Examples /// /// ```