From 78bdda1573878676c8ec4c3d6957d3adabda0c56 Mon Sep 17 00:00:00 2001 From: Colin Wallace Date: Mon, 22 May 2017 05:23:47 -0700 Subject: [PATCH 1/2] Mention Vec::into_boxed_slice in docs for [T]::into_vec. `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. --- src/libcollections/slice.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs index 3efda1faa3b56..3012dcf0e392b 100644 --- a/src/libcollections/slice.rs +++ b/src/libcollections/slice.rs @@ -1410,6 +1410,11 @@ impl [T] { /// Converts `self` into a vector without clones or allocation. /// + /// The resulting vector can be converted back into a box via + /// the [`into_boxed_slice`] method. + /// + /// [`into_boxed_slice`]: vec/struct.Vec.html#method.into_boxed_slice + /// /// # Examples /// /// ``` From 6e8e5c9fd72c7f793a65b710fe1ce346fd59d593 Mon Sep 17 00:00:00 2001 From: Colin Wallace Date: Mon, 22 May 2017 16:39:31 -0700 Subject: [PATCH 2/2] Slice::into_vec: Don't link to Vec::into_boxed_slice The documentation for this method appears on multiple different pages, which causes the relative links to not always work. --- src/libcollections/slice.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs index 3012dcf0e392b..5696f5fe6a7ba 100644 --- a/src/libcollections/slice.rs +++ b/src/libcollections/slice.rs @@ -1411,9 +1411,7 @@ impl [T] { /// Converts `self` into a vector without clones or allocation. /// /// The resulting vector can be converted back into a box via - /// the [`into_boxed_slice`] method. - /// - /// [`into_boxed_slice`]: vec/struct.Vec.html#method.into_boxed_slice + /// `Vec`'s `into_boxed_slice` method. /// /// # Examples ///