diff --git a/library/core/src/str/converts.rs b/library/core/src/str/converts.rs index ef26cbfb640bf..81b1db4ac6fed 100644 --- a/library/core/src/str/converts.rs +++ b/library/core/src/str/converts.rs @@ -144,11 +144,7 @@ pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> { /// /// # Safety /// -/// This function is unsafe because it does not check that the bytes passed to -/// it are valid UTF-8. If this constraint is violated, undefined behavior -/// results, as the rest of Rust assumes that [`&str`]s are valid UTF-8. -/// -/// [`&str`]: str +/// The bytes passed in must be valid UTF-8. /// /// # Examples ///