This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPSTREAM: rust: sync: add
Arc::{from_raw, into_raw}
These methods can be used to turn an `Arc` into a raw pointer and back, in a way that preserves the metadata for fat pointers. This is done using the unstable ptr_metadata feature [1]. However, it could also be done using the unstable pointer_byte_offsets feature [2], which is likely to have a shorter path to stabilization than ptr_metadata. Link: rust-lang/rust#81513 [1] Link: rust-lang/rust#96283 [2] Signed-off-by: Wedson Almeida Filho <[email protected]> Co-developed-by: Alice Ryhl <[email protected]> Signed-off-by: Alice Ryhl <[email protected]> Reviewed-by: Gary Guo <[email protected]> Reviewed-by: Martin Rodriguez Reboredo <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Reviewed-by: Andreas Hindborg <[email protected]> Reviewed-by: Boqun Feng <[email protected]> Signed-off-by: Tejun Heo <[email protected]> [ Upstream commit a832177 ] Change-Id: I3e02e5596bb18ac8255b8659e8ec9a76c5b2ac92 Signed-off-by: Alice Ryhl <[email protected]>
- Loading branch information