Lines Matching full:safety

142 // SAFETY: All zeros is equivalent to `None` (option layout optimization guarantee:
146 // SAFETY: `Box` is `Send` if `T` is `Send` because the `Box` owns a `T`.
154 // SAFETY: `Box` is `Sync` if `T` is `Sync` because the `Box` owns a `T`.
169 /// # Safety
178 // INVARIANT: Validity of `raw` is guaranteed by the safety preconditions of this function.
179 // SAFETY: By the safety preconditions of this function, `raw` is not a NULL pointer.
194 /// // SAFETY: `ptr` comes from a previous call to `KBox::into_raw`.
210 // SAFETY: `Box::into_raw` always returns a properly aligned and dereferenceable pointer
225 /// # Safety
231 // SAFETY: `raw` comes from a previous call to `Box::into_raw`. By the safety requirements
241 // SAFETY: We've just initialized `b`'s value.
298 // SAFETY: `__GFP_ZERO` guarantees the memory is zeroed; `T: Zeroable` guarantees that
371 // SAFETY:
377 // SAFETY:
388 // SAFETY: `slice` points to an allocation allocated with `A` (`buffer`) and holds a valid
403 // SAFETY: `ptr` is valid, because it came from `Box::into_raw`.
423 // SAFETY: `ptr` is valid, because it came from `this`. After this call we never access the
432 // SAFETY: By the type invariant `&*b` is valid for `read`.
449 // SAFETY: The value wrapped inside a `Pin<Box<T, A>>` cannot be moved or replaced as long
464 // SAFETY: When init errors/panics, slot will get deallocated but not dropped,
467 // SAFETY: All fields have been initialized.
474 // SAFETY: When init errors/panics, slot will get deallocated but not dropped,
477 // SAFETY: All fields have been initialized.
505 // SAFETY: The pointer returned by `into_foreign` comes from a well aligned
531 // SAFETY: The safety requirements of this function ensure that `ptr` comes from a previous
537 // SAFETY: The safety requirements of this method ensure that the object remains alive and
544 // SAFETY: The safety requirements of this method ensure that the pointer is valid and that
550 // SAFETY: The pointer returned by `into_foreign` comes from a well aligned
567 // SAFETY: We are still treating the box as pinned.
572 // SAFETY: The safety requirements of this function ensure that `ptr` comes from a previous
578 // SAFETY: The safety requirements for this function ensure that the object is still alive,
580 // The safety requirements of `from_foreign` also ensure that the object remains alive for
584 // SAFETY: This pointer originates from a `Pin<Box<T>>`.
590 // SAFETY: The safety requirements for this function ensure that the object is still alive,
592 // The safety requirements of `from_foreign` also ensure that the object remains alive for
596 // SAFETY: This pointer originates from a `Pin<Box<T>>`.
609 // SAFETY: `self.0` is always properly aligned, dereferenceable and points to an initialized
621 // SAFETY: `self.0` is always properly aligned, dereferenceable and points to an initialized
709 // SAFETY: The pointer in `self.0` is guaranteed to be valid by the type invariant.
712 // SAFETY:
738 /// // SAFETY: There is no concurrent read or write to the same page.
752 // SAFETY: