From d29d87f08bcb495f94b1ebb1b8d1ea197da86dbc Mon Sep 17 00:00:00 2001 From: Violet Date: Sat, 27 Mar 2021 13:45:30 -0400 Subject: [PATCH 1/3] update links to make_ascii_lowercase for slice to point to methods on the same type, rather than on u8 --- library/alloc/src/slice.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs index 8cd4ef7a14e..7cbb88c820d 100644 --- a/library/alloc/src/slice.rs +++ b/library/alloc/src/slice.rs @@ -642,7 +642,7 @@ impl [u8] { /// /// To uppercase the value in-place, use [`make_ascii_uppercase`]. /// - /// [`make_ascii_uppercase`]: u8::make_ascii_uppercase + /// [`make_ascii_uppercase`]: #method.make_ascii_uppercase #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] #[inline] pub fn to_ascii_uppercase(&self) -> Vec { @@ -659,7 +659,7 @@ impl [u8] { /// /// To lowercase the value in-place, use [`make_ascii_lowercase`]. /// - /// [`make_ascii_lowercase`]: u8::make_ascii_lowercase + /// [`make_ascii_lowercase`]: #method.make_ascii_lowercase #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] #[inline] pub fn to_ascii_lowercase(&self) -> Vec { From 634d48d9d6a27a74400de4bbd7a28147d2665ad1 Mon Sep 17 00:00:00 2001 From: Violet Date: Sat, 27 Mar 2021 14:15:42 -0400 Subject: [PATCH 2/3] adjust documentation links for slice ascii case functions to use newer rustdoc link format --- library/alloc/src/slice.rs | 4 ++-- library/core/src/slice/ascii.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs index 7cbb88c820d..036b84bb1d5 100644 --- a/library/alloc/src/slice.rs +++ b/library/alloc/src/slice.rs @@ -642,7 +642,7 @@ impl [u8] { /// /// To uppercase the value in-place, use [`make_ascii_uppercase`]. /// - /// [`make_ascii_uppercase`]: #method.make_ascii_uppercase + /// [`make_ascii_uppercase`]: slice::make_ascii_uppercase #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] #[inline] pub fn to_ascii_uppercase(&self) -> Vec { @@ -659,7 +659,7 @@ impl [u8] { /// /// To lowercase the value in-place, use [`make_ascii_lowercase`]. /// - /// [`make_ascii_lowercase`]: #method.make_ascii_lowercase + /// [`make_ascii_lowercase`]: slice::make_ascii_lowercase #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] #[inline] pub fn to_ascii_lowercase(&self) -> Vec { diff --git a/library/core/src/slice/ascii.rs b/library/core/src/slice/ascii.rs index 42032bc9035..4249ac77d47 100644 --- a/library/core/src/slice/ascii.rs +++ b/library/core/src/slice/ascii.rs @@ -30,7 +30,7 @@ impl [u8] { /// To return a new uppercased value without modifying the existing one, use /// [`to_ascii_uppercase`]. /// - /// [`to_ascii_uppercase`]: #method.to_ascii_uppercase + /// [`to_ascii_uppercase`]: slice::to_ascii_uppercase #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] #[inline] pub fn make_ascii_uppercase(&mut self) { @@ -47,7 +47,7 @@ impl [u8] { /// To return a new lowercased value without modifying the existing one, use /// [`to_ascii_lowercase`]. /// - /// [`to_ascii_lowercase`]: #method.to_ascii_lowercase + /// [`to_ascii_lowercase`]: slice::to_ascii_lowercase #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] #[inline] pub fn make_ascii_lowercase(&mut self) { From 0a30c5b2ab8bc367803f32933522d39df8b58c9b Mon Sep 17 00:00:00 2001 From: Violet Date: Sat, 27 Mar 2021 14:38:43 -0400 Subject: [PATCH 3/3] revert rustdoc links in core to use #method. because they link to alloc, which may not be available --- library/core/src/slice/ascii.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/core/src/slice/ascii.rs b/library/core/src/slice/ascii.rs index 4249ac77d47..42032bc9035 100644 --- a/library/core/src/slice/ascii.rs +++ b/library/core/src/slice/ascii.rs @@ -30,7 +30,7 @@ impl [u8] { /// To return a new uppercased value without modifying the existing one, use /// [`to_ascii_uppercase`]. /// - /// [`to_ascii_uppercase`]: slice::to_ascii_uppercase + /// [`to_ascii_uppercase`]: #method.to_ascii_uppercase #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] #[inline] pub fn make_ascii_uppercase(&mut self) { @@ -47,7 +47,7 @@ impl [u8] { /// To return a new lowercased value without modifying the existing one, use /// [`to_ascii_lowercase`]. /// - /// [`to_ascii_lowercase`]: slice::to_ascii_lowercase + /// [`to_ascii_lowercase`]: #method.to_ascii_lowercase #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] #[inline] pub fn make_ascii_lowercase(&mut self) {