Lines Matching full:safety

103 // SAFETY: All zeros is equivalent to `None` (option layout optimization guarantee:
107 // SAFETY: `Box` is `Send` if `T` is `Send` because the `Box` owns a `T`.
115 // SAFETY: `Box` is `Sync` if `T` is `Sync` because the `Box` owns a `T`.
130 /// # Safety
139 // INVARIANT: Validity of `raw` is guaranteed by the safety preconditions of this function. in from_raw()
140 // SAFETY: By the safety preconditions of this function, `raw` is not a NULL pointer. in from_raw()
155 /// // SAFETY: `ptr` comes from a previous call to `KBox::into_raw`.
171 // SAFETY: `Box::into_raw` always returns a properly aligned and dereferenceable pointer in leak()
186 /// # Safety
192 // SAFETY: `raw` comes from a previous call to `Box::into_raw`. By the safety requirements in assume_init()
202 // SAFETY: We've just initialized `b`'s value. in write()
263 // SAFETY: `ptr` is valid, because it came from `Box::into_raw`. in forget_contents()
283 // SAFETY: `ptr` is valid, because it came from `this`. After this call we never access the in drop_contents()
292 // SAFETY: By the type invariant `&*b` is valid for `read`. in into_inner()
309 // SAFETY: The value wrapped inside a `Pin<Box<T, A>>` cannot be moved or replaced as long in from()
323 // SAFETY: When init errors/panics, slot will get deallocated but not dropped, in write_init()
326 // SAFETY: All fields have been initialized. in write_init()
332 // SAFETY: When init errors/panics, slot will get deallocated but not dropped, in write_pin_init()
335 // SAFETY: All fields have been initialized. in write_pin_init()
375 // SAFETY: The safety requirements of this function ensure that `ptr` comes from a previous in from_foreign()
381 // SAFETY: The safety requirements of this method ensure that the object remains alive and in borrow()
388 // SAFETY: The safety requirements of this method ensure that the pointer is valid and that in borrow_mut()
402 // SAFETY: We are still treating the box as pinned. in into_foreign()
407 // SAFETY: The safety requirements of this function ensure that `ptr` comes from a previous in from_foreign()
413 // SAFETY: The safety requirements for this function ensure that the object is still alive, in borrow()
415 // The safety requirements of `from_foreign` also ensure that the object remains alive for in borrow()
419 // SAFETY: This pointer originates from a `Pin<Box<T>>`. in borrow()
425 // SAFETY: The safety requirements for this function ensure that the object is still alive, in borrow_mut()
427 // The safety requirements of `from_foreign` also ensure that the object remains alive for in borrow_mut()
431 // SAFETY: This pointer originates from a `Pin<Box<T>>`. in borrow_mut()
444 // SAFETY: `self.0` is always properly aligned, dereferenceable and points to an initialized in deref()
456 // SAFETY: `self.0` is always properly aligned, dereferenceable and points to an initialized in deref_mut()
490 // SAFETY: The pointer in `self.0` is guaranteed to be valid by the type invariant. in drop()
493 // SAFETY: in drop()