]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/str/mod.rs
Rollup merge of #106328 - GuillaumeGomez:gui-test-explanation, r=notriddle
[rust.git] / library / core / src / str / mod.rs
index 863ded5e5ec037836586366e1ac2a2a41a3bbe02..ab2f8520ecb33d969a479891fdca82997b90144e 100644 (file)
@@ -368,7 +368,7 @@ pub const fn as_bytes(&self) -> &[u8] {
     #[inline(always)]
     pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8] {
         // SAFETY: the cast from `&str` to `&[u8]` is safe since `str`
-        // has the same layout as `&[u8]` (only libstd can make this guarantee).
+        // has the same layout as `&[u8]` (only std can make this guarantee).
         // The pointer dereference is safe since it comes from a mutable reference which
         // is guaranteed to be valid for writes.
         unsafe { &mut *(self as *mut str as *mut [u8]) }