diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-03-19 10:18:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-19 10:18:19 -0400 |
| commit | 969e625a19694da7ec0956d2eb2d505d89f527f9 (patch) | |
| tree | fd176027408cbefa6a9902e2e221fb5e0650032c | |
| parent | d74c528f3a6db6a220c393690f16713b2f33bc54 (diff) | |
| parent | 963d4dfddeb302326432eb089771c4aed29f7b5c (diff) | |
| download | rust-969e625a19694da7ec0956d2eb2d505d89f527f9.tar.gz rust-969e625a19694da7ec0956d2eb2d505d89f527f9.zip | |
Rollup merge of #40603 - QuietMisdreavus:slice-ptr-docs, r=GuillaumeGomez
minor wording tweak to slice::{as_ptr, as_mut_ptr}
Per #37334, the slice-as-pointer methods mentioned that "modifying the slice may cause its buffer to be reallocated", when in fact modifying the *slice* itself would cause no such change. (It is a borrow, after all!) This is a tweak to the wording of that line to stress it's the *collection* that could cause the buffer to be reallocated.
r? @steveklabnik
| -rw-r--r-- | src/libcollections/slice.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs index 11fc1d553f2..7d3bd1cc569 100644 --- a/src/libcollections/slice.rs +++ b/src/libcollections/slice.rs @@ -437,8 +437,8 @@ impl<T> [T] { /// The caller must ensure that the slice outlives the pointer this /// function returns, or else it will end up pointing to garbage. /// - /// Modifying the slice may cause its buffer to be reallocated, which - /// would also make any pointers to it invalid. + /// Modifying the container referenced by this slice may cause its buffer + /// to be reallocated, which would also make any pointers to it invalid. /// /// # Examples /// @@ -463,8 +463,8 @@ impl<T> [T] { /// The caller must ensure that the slice outlives the pointer this /// function returns, or else it will end up pointing to garbage. /// - /// Modifying the slice may cause its buffer to be reallocated, which - /// would also make any pointers to it invalid. + /// Modifying the container referenced by this slice may cause its buffer + /// to be reallocated, which would also make any pointers to it invalid. /// /// # Examples /// |
