Capitalize safety comments
This commit is contained in:
parent
c66789d572
commit
2799aec6ab
@ -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 {
|
||||
|
@ -157,7 +157,7 @@ impl Global {
|
||||
}
|
||||
}
|
||||
|
||||
// Safety: Same as `AllocRef::grow`
|
||||
// SAFETY: Same as `AllocRef::grow`
|
||||
#[inline]
|
||||
unsafe fn grow_impl(
|
||||
&mut self,
|
||||
|
@ -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()`,
|
||||
|
@ -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(()));
|
||||
|
Loading…
Reference in New Issue
Block a user