about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-02-08 22:19:41 +0000
committerbors <bors@rust-lang.org>2016-02-08 22:19:41 +0000
commitf8fa6140fa6a85ea21ef4d2d56764862f7b3728b (patch)
tree9deb9863d8a407f3dc5e5e979810b4d9c0f9ea39 /src/liballoc
parentefdde2479b3099b35b38a7445b5f09559e3f1fd0 (diff)
parent3cafce659642058f44b08305b115852b1bd1d1e6 (diff)
downloadrust-f8fa6140fa6a85ea21ef4d2d56764862f7b3728b.tar.gz
rust-f8fa6140fa6a85ea21ef4d2d56764862f7b3728b.zip
Auto merge of #31397 - bradfirj:arc-docfix, r=steveklabnik
The documentation for the `make_mut` function on `Arc<T>` contains a somewhat impenetrable double-negative that I was only able to fully grasp by looking at the implementation. Here's a quick rewrite that reads a lot better.

The sentence "doesn't have one strong reference and no weak references." is a
hard to understand, and it can be much more easily explained. In particular, such a double-negative
could give English as a Second Language users even more trouble than native speakers.

r? @steveklabnik
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index 424a689bcb0..217d9d7e077 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -380,9 +380,9 @@ impl<T: ?Sized> Deref for Arc<T> {
 }
 
 impl<T: Clone> Arc<T> {
-    /// Make a mutable reference into the given `Arc<T>` by cloning the inner
-    /// data if the `Arc<T>` doesn't have one strong reference and no weak
-    /// references.
+    /// Make a mutable reference into the given `Arc<T>`.
+    /// If the `Arc<T>` has more than one strong reference, or any weak
+    /// references, the inner data is cloned.
     ///
     /// This is also referred to as a copy-on-write.
     ///