Skip to content

Commit

Permalink
pointers are mutually compatible even if they are wide
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Sep 3, 2023
1 parent 81dadf6 commit 037afca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions library/core/src/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1545,8 +1545,8 @@ mod prim_ref {}
/// The following types are guaranteed to be ABI-compatible:
///
/// - Every type is ABI-compatible with itself.
/// - If `<T as Pointee>::Metadata == ()`, then `*const T`, `*mut T`, `&T`, `&mut T`, `Box<T>`,
/// `NonNull<T>` are all ABI-compatible with each other.
/// - `*const T`, `*mut T`, `&T`, `&mut T`, `Box<T>`, `NonNull<T>` are all ABI-compatible with each
/// other for all `T`.
/// - Any two `fn()` types with the same `extern` ABI string are ABI-compatible with each other.
/// - Any two 1-ZST types (types with size 0 and alignment 1) are ABI-compatible.
/// - A `repr(transparent)` type `T` is ABI-compatible with its unique non-1-ZST field (if there is
Expand Down
4 changes: 2 additions & 2 deletions library/std/src/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1545,8 +1545,8 @@ mod prim_ref {}
/// The following types are guaranteed to be ABI-compatible:
///
/// - Every type is ABI-compatible with itself.
/// - If `<T as Pointee>::Metadata == ()`, then `*const T`, `*mut T`, `&T`, `&mut T`, `Box<T>`,
/// `NonNull<T>` are all ABI-compatible with each other.
/// - `*const T`, `*mut T`, `&T`, `&mut T`, `Box<T>`, `NonNull<T>` are all ABI-compatible with each
/// other for all `T`.
/// - Any two `fn()` types with the same `extern` ABI string are ABI-compatible with each other.
/// - Any two 1-ZST types (types with size 0 and alignment 1) are ABI-compatible.
/// - A `repr(transparent)` type `T` is ABI-compatible with its unique non-1-ZST field (if there is
Expand Down

0 comments on commit 037afca

Please sign in to comment.