Lines Matching full:safety

150 // SAFETY: It is safe to send `Arc<T>` to another thread when the underlying `T` is `Sync` because
156 // SAFETY: It is safe to send `&Arc<T>` to another thread when the underlying `T` is `Sync`
168 // SAFETY: There are no safety requirements for this FFI call. in try_new()
175 // SAFETY: We just created `inner` with a reference count of 1, which is owned by the new in try_new()
206 /// # Safety
211 // INVARIANT: By the safety requirements, the invariants hold. in from_inner()
224 // SAFETY: The constraint that the lifetime of the shared reference must outlive that of in as_arc_borrow()
244 // SAFETY: By the safety requirement of this function, we know that `ptr` came from in borrow()
248 // SAFETY: The safety requirements of `from_foreign` ensure that the object remains alive in borrow()
254 // SAFETY: By the safety requirement of this function, we know that `ptr` came from in from_foreign()
265 // SAFETY: By the type invariant, there is necessarily a reference to the object, so it is in deref()
280 // SAFETY: By the type invariant, there is necessarily a reference to the object, so it is in clone()
284 // SAFETY: We just incremented the refcount. This increment is now owned by the new `Arc`. in clone()
291 // SAFETY: By the type invariant, there is necessarily a reference to the object. We cannot in drop()
299 // SAFETY: Also by the type invariant, we are allowed to decrement the refcount. in drop()
304 // SAFETY: The pointer was initialised from the result of `Box::leak`. in drop()
318 // SAFETY: The type invariants of `Arc` guarantee that the data is pinned. in from()
404 /// # Safety
410 // INVARIANT: The safety requirements guarantee the invariants. in new()
420 // SAFETY: The existence of `b` guarantees that the refcount is non-zero. `ManuallyDrop` in from()
433 // SAFETY: By the type invariant, the underlying object is still alive with no mutable in deref()
530 // SAFETY: There are no safety requirements for this FFI call. in try_new_uninit()
536 // SAFETY: The pointer from the `Box` is valid. in try_new_uninit()
546 // SAFETY: We just wrote the value to be initialized. in write()
552 /// # Safety
559 // SAFETY: The new `Arc` is taking over `ptr` from `self.inner` (which won't be in assume_init()
567 // SAFETY: The supplied pointer is valid for initialization. in init_with()
569 // SAFETY: Initialization completed successfully. in init_with()
580 // SAFETY: The supplied pointer is valid for initialization and we will later pin the value in pin_init_with()
583 // SAFETY: Initialization completed successfully. in pin_init_with()
592 // SAFETY: It is not possible to move/replace `T` inside a `Pin<UniqueArc<T>>` (unless `T` in from()
608 // SAFETY: By the `Arc` type invariant, there is necessarily a reference to the object, so in deref_mut()