]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/mem/maybe_uninit.rs
Capitalize safety comments
[rust.git] / library / core / src / mem / maybe_uninit.rs
index b64abf68c5e4a6184d0af45d889e7f1cba0891f2..3a7489aa27955870992f6a9031390aeef467fa13 100644 (file)
@@ -599,7 +599,7 @@ pub unsafe fn read(&self) -> T {
     /// // Now that our `MaybeUninit<_>` is known to be initialized, it is okay to
     /// // create a shared reference to it:
     /// let x: &Vec<u32> = unsafe {
-    ///     // Safety: `x` has been initialized.
+    ///     // SAFETY: `x` has been initialized.
     ///     x.assume_init_ref()
     /// };
     /// assert_eq!(x, &vec![1, 2, 3]);
@@ -676,7 +676,7 @@ pub unsafe fn assume_init_ref(&self) -> &T {
     /// // To assert our buffer has been initialized without copying it, we upgrade
     /// // the `&mut MaybeUninit<[u8; 2048]>` to a `&mut [u8; 2048]`:
     /// let buf: &mut [u8; 2048] = unsafe {
-    ///     // Safety: `buf` has been initialized.
+    ///     // SAFETY: `buf` has been initialized.
     ///     buf.assume_init_mut()
     /// };
     ///