diff --git a/library/core/src/convert/mod.rs b/library/core/src/convert/mod.rs index a6d3b5ef813f1..e1b19e4b73cc9 100644 --- a/library/core/src/convert/mod.rs +++ b/library/core/src/convert/mod.rs @@ -616,6 +616,14 @@ impl AsRef for str { } } +#[stable(feature = "as_mut_str_for_str", since = "1.51.0")] +impl AsMut for str { + #[inline] + fn as_mut(&mut self) -> &mut str { + self + } +} + //////////////////////////////////////////////////////////////////////////////// // THE NO-ERROR ERROR TYPE ////////////////////////////////////////////////////////////////////////////////