Skip to content

Commit bdf8bbd

Browse files
authored
Rollup merge of #80442 - steffahn:mention_arc_in_cow, r=Mark-Simulacrum
Mention Arc::make_mut and Rc::make_mut in the documentation of Cow Following this discussion: https://users.rust-lang.org/t/should-the-cow-documentation-mention-arc/53341 _Rendered (the last paragraph is new):_ ![Screenshot_20201228_171551](https://user-images.githubusercontent.com/3986214/103228135-5d72e200-4930-11eb-89e1-38b5c86b08c7.png) `@rustbot` modify labels: T-doc, T-libs
2 parents 61f5a00 + 303203f commit bdf8bbd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

library/alloc/src/borrow.rs

+5
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ where
103103
/// is desired, `to_mut` will obtain a mutable reference to an owned
104104
/// value, cloning if necessary.
105105
///
106+
/// If you need reference-counting pointers, note that
107+
/// [`Rc::make_mut`][crate::rc::Rc::make_mut] and
108+
/// [`Arc::make_mut`][crate::sync::Arc::make_mut] can provide clone-on-write
109+
/// functionality as well.
110+
///
106111
/// # Examples
107112
///
108113
/// ```

0 commit comments

Comments
 (0)