Skip to content

Commit 2799aec

Browse files
committed
Capitalize safety comments
1 parent c66789d commit 2799aec

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

compiler/rustc_data_structures/src/temp_dir.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub struct MaybeTempDir {
1212

1313
impl Drop for MaybeTempDir {
1414
fn drop(&mut self) {
15-
// Safety: We are in the destructor, and no further access will
15+
// SAFETY: We are in the destructor, and no further access will
1616
// occur.
1717
let dir = unsafe { ManuallyDrop::take(&mut self.dir) };
1818
if self.keep {

library/alloc/src/alloc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl Global {
157157
}
158158
}
159159

160-
// Safety: Same as `AllocRef::grow`
160+
// SAFETY: Same as `AllocRef::grow`
161161
#[inline]
162162
unsafe fn grow_impl(
163163
&mut self,

library/alloc/src/collections/vec_deque.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2392,7 +2392,7 @@ impl<T> VecDeque<T> {
23922392
}
23932393
}
23942394

2395-
// Safety: the following two methods require that the rotation amount
2395+
// SAFETY: the following two methods require that the rotation amount
23962396
// be less than half the length of the deque.
23972397
//
23982398
// `wrap_copy` requires that `min(x, cap() - x) + copy_len <= cap()`,

src/test/ui/generator/static-generators.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn main() {
1212
yield;
1313
assert_eq!(b as *const _, &a as *const _);
1414
};
15-
// Safety: We shadow the original generator variable so have no safe API to
15+
// SAFETY: We shadow the original generator variable so have no safe API to
1616
// move it after this point.
1717
let mut generator = unsafe { Pin::new_unchecked(&mut generator) };
1818
assert_eq!(generator.as_mut().resume(()), GeneratorState::Yielded(()));

0 commit comments

Comments
 (0)