about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-05-23 00:15:45 -0400
committerGitHub <noreply@github.com>2017-05-23 00:15:45 -0400
commit951eb5566ea3e44e9c55faf8f8337a469f26e6f7 (patch)
tree54e48376eaac1455316833323786dda04e9bddf8
parentb2c742363d57a3ebd131b6e8ae57c109d1ace057 (diff)
parent6e8e5c9fd72c7f793a65b710fe1ce346fd59d593 (diff)
downloadrust-951eb5566ea3e44e9c55faf8f8337a469f26e6f7.tar.gz
rust-951eb5566ea3e44e9c55faf8f8337a469f26e6f7.zip
Rollup merge of #42151 - Wallacoloo:docfix_into_vec, r=frewsxcv
Mention Vec::into_boxed_slice in documentation of [T]::into_vec

This is a documentation fix.

`Vec::into_boxed_slice` and `[T]::into_vec` are inverses, so it makes sense to mention the other in their respective documentation for visibility. `Vec::into_boxed_slice` already mentions `[T]::into_vec`, but not the other way around until now.

Tagging @steveklabnik per his request.
-rw-r--r--src/libcollections/slice.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs
index 3efda1faa3b..5696f5fe6a7 100644
--- a/src/libcollections/slice.rs
+++ b/src/libcollections/slice.rs
@@ -1410,6 +1410,9 @@ impl<T> [T] {
 
     /// Converts `self` into a vector without clones or allocation.
     ///
+    /// The resulting vector can be converted back into a box via
+    /// `Vec<T>`'s `into_boxed_slice` method.
+    ///
     /// # Examples
     ///
     /// ```