about summary refs log tree commit diff
path: root/library/alloc
diff options
context:
space:
mode:
authorFrank Steffahn <frank.steffahn@stu.uni-kiel.de>2020-12-28 16:59:36 +0100
committerFrank Steffahn <frank.steffahn@stu.uni-kiel.de>2020-12-28 17:13:28 +0100
commit303203f992088d05d930b2d7e4bb826c2b611a53 (patch)
tree311152df4be34cbc0e6feb6e13c0a618c5331c0f /library/alloc
parentaef92d44e4e83fe7d5ddb741a274754466207402 (diff)
downloadrust-303203f992088d05d930b2d7e4bb826c2b611a53.tar.gz
rust-303203f992088d05d930b2d7e4bb826c2b611a53.zip
Mention Arc::make_mut and Rc::make_mut in the documentation of Cow
Diffstat (limited to 'library/alloc')
-rw-r--r--library/alloc/src/borrow.rs5
1 files changed, 5 insertions, 0 deletions
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 @@ where
 /// 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
 ///
 /// ```