about summary refs log tree commit diff
path: root/library/std/src/lazy.rs
diff options
context:
space:
mode:
authorFlying-Toast <38232168+Flying-Toast@users.noreply.github.com>2020-09-08 22:26:44 -0400
committerFlying-Toast <38232168+Flying-Toast@users.noreply.github.com>2020-09-08 22:26:44 -0400
commitc66789d572ab3d950bc187d3bca3bc0042023358 (patch)
tree26872b4ec4e3140cb54b9b68ea4c389d0f9112af /library/std/src/lazy.rs
parent90782cb50ba6d1f2ea97cf74a3b06eca6bef8b59 (diff)
downloadrust-c66789d572ab3d950bc187d3bca3bc0042023358.tar.gz
rust-c66789d572ab3d950bc187d3bca3bc0042023358.zip
Capitalize safety comments
Diffstat (limited to 'library/std/src/lazy.rs')
-rw-r--r--library/std/src/lazy.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/lazy.rs b/library/std/src/lazy.rs
index d171231b0f1..091e2091fb0 100644
--- a/library/std/src/lazy.rs
+++ b/library/std/src/lazy.rs
@@ -293,7 +293,7 @@ impl<T> SyncOnceCell<T> {
 
         debug_assert!(self.is_initialized());
 
-        // Safety: The inner value has been initialized
+        // SAFETY: The inner value has been initialized
         Ok(unsafe { self.get_unchecked() })
     }
 
@@ -316,7 +316,7 @@ impl<T> SyncOnceCell<T> {
     /// ```
     #[unstable(feature = "once_cell", issue = "74465")]
     pub fn into_inner(mut self) -> Option<T> {
-        // Safety: Safe because we immediately free `self` without dropping
+        // SAFETY: Safe because we immediately free `self` without dropping
         let inner = unsafe { self.take_inner() };
 
         // Don't drop this `SyncOnceCell`. We just moved out one of the fields, but didn't set
@@ -416,7 +416,7 @@ impl<T> SyncOnceCell<T> {
 
 unsafe impl<#[may_dangle] T> Drop for SyncOnceCell<T> {
     fn drop(&mut self) {
-        // Safety: The cell is being dropped, so it can't be accessed again.
+        // SAFETY: The cell is being dropped, so it can't be accessed again.
         // We also don't touch the `T`, which validates our usage of #[may_dangle].
         unsafe { self.take_inner() };
     }