From cff790c98e9601281accf86f9c80cf894727564b Mon Sep 17 00:00:00 2001 From: waffle Date: Wed, 21 May 2025 23:43:57 +0200 Subject: [PATCH] add doc alias `replace_first` for `str::replacen` --- library/alloc/src/str.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs index 8766fd904b074..f1b1734b8b2d0 100644 --- a/library/alloc/src/str.rs +++ b/library/alloc/src/str.rs @@ -320,6 +320,7 @@ impl str { /// ``` #[cfg(not(no_global_oom_handling))] #[rustc_allow_incoherent_impl] + #[doc(alias = "replace_first")] #[must_use = "this returns the replaced string as a new allocation, \ without modifying the original"] #[stable(feature = "str_replacen", since = "1.16.0")]