]> git.proxmox.com Git - rustc.git/blobdiff - library/core/src/str/converts.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / library / core / src / str / converts.rs
index ef26cbfb640bfea89ee4aa8ea0e566b4578ffea9..81b1db4ac6feda2a1290e767526ea5608078b6ca 100644 (file)
@@ -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
 ///