Skip to content

Commit

Permalink
Rollup merge of rust-lang#130653 - RalfJung:result-abi-compat, r=trav…
Browse files Browse the repository at this point in the history
…iscross

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``
  • Loading branch information
compiler-errors authored Sep 21, 2024
2 parents 2953dee + db6427b commit d098993
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
///
Expand Down

0 comments on commit d098993

Please # to comment.