Rollup merge of #130653 - RalfJung:result-abi-compat, r=traviscross

ABI compatibility: mention Result guarantee

This has been already documented in https://doc.rust-lang.org/std/result/index.html#representation, but for `Option` we mirrored those docs in the "ABI compatibility" section, so let's do the same here.

Cc ``@workingjubilee`` ``@rust-lang/lang``
This commit is contained in:
Michael Goulet 2024-09-21 15:18:57 -04:00 committed by GitHub
commit 2e43793fd6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1761,6 +1761,8 @@ mod prim_ref {}
/// - `i32` is ABI-compatible with `NonZero<i32>`, and similar for all other integer types.
/// - If `T` is guaranteed to be subject to the [null pointer
/// optimization](option/index.html#representation), then `T` and `Option<T>` are ABI-compatible.
/// Furthermore, if `U` satisfies the requirements [outlined here](result/index.html#representation),
/// then `T` and `Result<T, U>` and `Result<U, T>` are all ABI-compatible.
///
/// Furthermore, ABI compatibility satisfies the following general properties:
///