pub const fn three_way_compare<T: Copy>(lhs: T, rhss: T) -> Ordering
🔬This is a nightly-only experimental API. (
core_intrinsics
)Expand description
Does a three-way comparison between the two arguments, which must be of character or integer (signed or unsigned) type.
This was originally added because it greatly simplified the MIR in cmp
implementations, and then LLVM 20 added a backend intrinsic for it too.
The stabilized version of this intrinsic is Ord::cmp
.