File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3242,6 +3242,8 @@ pub const fn bitreverse<T: Copy>(_x: T) -> T {
3242
3242
/// large and difficult to optimize.
3243
3243
///
3244
3244
/// The stabilized version of this intrinsic is [`Ord::cmp`].
3245
+ #[ rustc_intrinsic_const_stable_indirect]
3246
+ #[ rustc_nounwind]
3245
3247
#[ rustc_intrinsic]
3246
3248
#[ rustc_intrinsic_must_be_overridden]
3247
3249
pub const fn three_way_compare < T : Copy > ( _lhs : T , _rhss : T ) -> crate :: cmp:: Ordering {
Original file line number Diff line number Diff line change @@ -3526,9 +3526,7 @@ macro_rules! int_impl {
3526
3526
// exactly like we need and can be the place to deal with the complexity.
3527
3527
3528
3528
// FIXME(const-hack): replace with cmp
3529
- if self < 0 { -1 }
3530
- else if self == 0 { 0 }
3531
- else { 1 }
3529
+ crate :: intrinsics:: three_way_compare( self , 0 ) as Self
3532
3530
}
3533
3531
3534
3532
/// Returns `true` if `self` is positive and `false` if the number is zero or
You can’t perform that action at this time.
0 commit comments