Lines Matching full:safety
102 // SAFETY: `Box` is `Send` if `T` is `Send` because the `Box` owns a `T`.
110 // SAFETY: `Box` is `Sync` if `T` is `Sync` because the `Box` owns a `T`.
125 /// # Safety
134 // INVARIANT: Validity of `raw` is guaranteed by the safety preconditions of this function. in from_raw()
135 // SAFETY: By the safety preconditions of this function, `raw` is not a NULL pointer. in from_raw()
150 /// // SAFETY: `ptr` comes from a previous call to `KBox::into_raw`.
166 // SAFETY: `Box::into_raw` always returns a properly aligned and dereferenceable pointer in leak()
181 /// # Safety
187 // SAFETY: `raw` comes from a previous call to `Box::into_raw`. By the safety requirements in assume_init()
197 // SAFETY: We've just initialized `b`'s value. in write()
252 // SAFETY: `ptr` is valid, because it came from `Box::into_raw`. in forget_contents()
272 // SAFETY: `ptr` is valid, because it came from `this`. After this call we never access the in drop_contents()
281 // SAFETY: By the type invariant `&*b` is valid for `read`. in into_inner()
298 // SAFETY: The value wrapped inside a `Pin<Box<T, A>>` cannot be moved or replaced as long in from()
312 // SAFETY: When init errors/panics, slot will get deallocated but not dropped, in write_init()
315 // SAFETY: All fields have been initialized. in write_init()
321 // SAFETY: When init errors/panics, slot will get deallocated but not dropped, in write_pin_init()
324 // SAFETY: All fields have been initialized. in write_pin_init()
364 // SAFETY: The safety requirements of this function ensure that `ptr` comes from a previous in from_foreign()
370 // SAFETY: The safety requirements of this method ensure that the object remains alive and in borrow()
377 // SAFETY: The safety requirements of this method ensure that the pointer is valid and that in borrow_mut()
391 // SAFETY: We are still treating the box as pinned. in into_foreign()
396 // SAFETY: The safety requirements of this function ensure that `ptr` comes from a previous in from_foreign()
402 // SAFETY: The safety requirements for this function ensure that the object is still alive, in borrow()
404 // The safety requirements of `from_foreign` also ensure that the object remains alive for in borrow()
408 // SAFETY: This pointer originates from a `Pin<Box<T>>`. in borrow()
414 // SAFETY: The safety requirements for this function ensure that the object is still alive, in borrow_mut()
416 // The safety requirements of `from_foreign` also ensure that the object remains alive for in borrow_mut()
420 // SAFETY: This pointer originates from a `Pin<Box<T>>`. in borrow_mut()
433 // SAFETY: `self.0` is always properly aligned, dereferenceable and points to an initialized in deref()
445 // SAFETY: `self.0` is always properly aligned, dereferenceable and points to an initialized in deref_mut()
479 // SAFETY: The pointer in `self.0` is guaranteed to be valid by the type invariant. in drop()
482 // SAFETY: in drop()