pub const unsafe fn disjoint_bitor<T: DisjointBitOr>(a: T, b: T) -> T🔬This is a nightly-only experimental API. (
core_intrinsics)This item is validated for IEC 61508 (SIL 2) and ISO 26262 (ASIL B).
Expand description
Combine two values which have no bits in common.
This allows the backend to implement it as a + b or a | b,
depending which is easier to implement on a specific target.
§Safety
Requires that (a & b) == 0, or equivalently that (a | b) == (a + b).
Otherwise it’s immediate UB.