about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlying-Toast <38232168+Flying-Toast@users.noreply.github.com>2020-09-08 22:37:18 -0400
committerFlying-Toast <38232168+Flying-Toast@users.noreply.github.com>2020-09-08 22:37:18 -0400
commit2799aec6ab4ae35f1a2064f941a9f2a270953b63 (patch)
treef6cb6109703f22c96a20d490270aa84cac6ac402
parentc66789d572ab3d950bc187d3bca3bc0042023358 (diff)
downloadrust-2799aec6ab4ae35f1a2064f941a9f2a270953b63.tar.gz
rust-2799aec6ab4ae35f1a2064f941a9f2a270953b63.zip
Capitalize safety comments
-rw-r--r--compiler/rustc_data_structures/src/temp_dir.rs2
-rw-r--r--library/alloc/src/alloc.rs2
-rw-r--r--library/alloc/src/collections/vec_deque.rs2
-rw-r--r--src/test/ui/generator/static-generators.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_data_structures/src/temp_dir.rs b/compiler/rustc_data_structures/src/temp_dir.rs
index 0d9b3e3ca25..a780d2386a6 100644
--- a/compiler/rustc_data_structures/src/temp_dir.rs
+++ b/compiler/rustc_data_structures/src/temp_dir.rs
@@ -12,7 +12,7 @@ pub struct MaybeTempDir {
 
 impl Drop for MaybeTempDir {
     fn drop(&mut self) {
-        // Safety: We are in the destructor, and no further access will
+        // SAFETY: We are in the destructor, and no further access will
         // occur.
         let dir = unsafe { ManuallyDrop::take(&mut self.dir) };
         if self.keep {
diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs
index 5f09f8def4d..341c6816197 100644
--- a/library/alloc/src/alloc.rs
+++ b/library/alloc/src/alloc.rs
@@ -157,7 +157,7 @@ impl Global {
         }
     }
 
-    // Safety: Same as `AllocRef::grow`
+    // SAFETY: Same as `AllocRef::grow`
     #[inline]
     unsafe fn grow_impl(
         &mut self,
diff --git a/library/alloc/src/collections/vec_deque.rs b/library/alloc/src/collections/vec_deque.rs
index cc2ef25a5a7..172b25b9d17 100644
--- a/library/alloc/src/collections/vec_deque.rs
+++ b/library/alloc/src/collections/vec_deque.rs
@@ -2392,7 +2392,7 @@ impl<T> VecDeque<T> {
         }
     }
 
-    // Safety: the following two methods require that the rotation amount
+    // SAFETY: the following two methods require that the rotation amount
     // be less than half the length of the deque.
     //
     // `wrap_copy` requires that `min(x, cap() - x) + copy_len <= cap()`,
diff --git a/src/test/ui/generator/static-generators.rs b/src/test/ui/generator/static-generators.rs
index 3980766c428..d098bf1e688 100644
--- a/src/test/ui/generator/static-generators.rs
+++ b/src/test/ui/generator/static-generators.rs
@@ -12,7 +12,7 @@ fn main() {
         yield;
         assert_eq!(b as *const _, &a as *const _);
     };
-    // Safety: We shadow the original generator variable so have no safe API to
+    // SAFETY: We shadow the original generator variable so have no safe API to
     // move it after this point.
     let mut generator = unsafe { Pin::new_unchecked(&mut generator) };
     assert_eq!(generator.as_mut().resume(()), GeneratorState::Yielded(()));