Skip to content

Commit 037afca

Browse files
committed
pointers are mutually compatible even if they are wide
1 parent 81dadf6 commit 037afca

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library/core/src/primitive_docs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1545,8 +1545,8 @@ mod prim_ref {}
15451545
/// The following types are guaranteed to be ABI-compatible:
15461546
///
15471547
/// - Every type is ABI-compatible with itself.
1548-
/// - If `<T as Pointee>::Metadata == ()`, then `*const T`, `*mut T`, `&T`, `&mut T`, `Box<T>`,
1549-
/// `NonNull<T>` are all ABI-compatible with each other.
1548+
/// - `*const T`, `*mut T`, `&T`, `&mut T`, `Box<T>`, `NonNull<T>` are all ABI-compatible with each
1549+
/// other for all `T`.
15501550
/// - Any two `fn()` types with the same `extern` ABI string are ABI-compatible with each other.
15511551
/// - Any two 1-ZST types (types with size 0 and alignment 1) are ABI-compatible.
15521552
/// - A `repr(transparent)` type `T` is ABI-compatible with its unique non-1-ZST field (if there is

library/std/src/primitive_docs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1545,8 +1545,8 @@ mod prim_ref {}
15451545
/// The following types are guaranteed to be ABI-compatible:
15461546
///
15471547
/// - Every type is ABI-compatible with itself.
1548-
/// - If `<T as Pointee>::Metadata == ()`, then `*const T`, `*mut T`, `&T`, `&mut T`, `Box<T>`,
1549-
/// `NonNull<T>` are all ABI-compatible with each other.
1548+
/// - `*const T`, `*mut T`, `&T`, `&mut T`, `Box<T>`, `NonNull<T>` are all ABI-compatible with each
1549+
/// other for all `T`.
15501550
/// - Any two `fn()` types with the same `extern` ABI string are ABI-compatible with each other.
15511551
/// - Any two 1-ZST types (types with size 0 and alignment 1) are ABI-compatible.
15521552
/// - A `repr(transparent)` type `T` is ABI-compatible with its unique non-1-ZST field (if there is

0 commit comments

Comments
 (0)