From 85d91c602f996fc725f067d7e87c732c610eae83 Mon Sep 17 00:00:00 2001 From: Zachary S Date: Sat, 27 Apr 2024 02:13:33 -0500 Subject: [PATCH] Hard-code doclink to avoid issue 98941 --- library/alloc/src/string.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 011a98e70865..98992cefa2d3 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -1742,9 +1742,7 @@ impl String { /// Replaces the leftmost occurrence of a pattern with another string, in-place. /// - /// This method should be preferred over [`str::replacen(..., 1)`] as it can use the `String`'s existing capacity to prevent a reallocation if sufficient space is available. - /// - /// [`str::replacen(..., 1)`]: str::replacen + /// This method should be preferred over [`str::replacen(..., 1)`](../../std/primitive.str.html#method.replacen) as it can use the `String`'s existing capacity to prevent a reallocation if sufficient space is available. /// /// # Examples ///