Capitalize safety comments

This commit is contained in:
Flying-Toast 2020-09-08 22:37:18 -04:00
parent c66789d572
commit 2799aec6ab
4 changed files with 4 additions and 4 deletions

View File

@ -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 {

View File

@ -157,7 +157,7 @@ impl Global {
}
}
// Safety: Same as `AllocRef::grow`
// SAFETY: Same as `AllocRef::grow`
#[inline]
unsafe fn grow_impl(
&mut self,

View File

@ -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()`,

View File

@ -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(()));