diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2021-01-05 09:52:33 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-05 09:52:33 +0900 |
| commit | bdf8bbde1db65b2800b4c688c16ae6d029b3ffc8 (patch) | |
| tree | d04cd93c08e3906e520f5e6b8436fcc1f3ec1aff | |
| parent | 61f5a0092364061ec5649ca98d5e3e9b927880fe (diff) | |
| parent | 303203f992088d05d930b2d7e4bb826c2b611a53 (diff) | |
| download | rust-bdf8bbde1db65b2800b4c688c16ae6d029b3ffc8.tar.gz rust-bdf8bbde1db65b2800b4c688c16ae6d029b3ffc8.zip | |
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):_  `@rustbot` modify labels: T-doc, T-libs
| -rw-r--r-- | library/alloc/src/borrow.rs | 5 |
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 /// /// ``` |
