24
24
25
25
use crate :: const_closure:: ConstFnMutClosure ;
26
26
use crate :: marker:: Destruct ;
27
+ #[ cfg( bootstrap) ]
27
28
use crate :: marker:: StructuralPartialEq ;
28
29
29
30
use self :: Ordering :: * ;
@@ -331,6 +332,7 @@ pub struct AssertParamIsEq<T: Eq + ?Sized> {
331
332
/// assert_eq!(Ordering::Greater, result);
332
333
/// ```
333
334
#[ derive( Clone , Copy , Eq , Debug , Hash ) ]
335
+ #[ cfg_attr( not( bootstrap) , derive_const( PartialOrd , Ord , PartialEq ) ) ]
334
336
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
335
337
#[ repr( i8 ) ]
336
338
pub enum Ordering {
@@ -877,10 +879,12 @@ pub macro Ord($item:item) {
877
879
}
878
880
879
881
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
882
+ #[ cfg( bootstrap) ]
880
883
impl StructuralPartialEq for Ordering { }
881
884
882
885
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
883
886
#[ rustc_const_unstable( feature = "const_cmp" , issue = "92391" ) ]
887
+ #[ cfg( bootstrap) ]
884
888
impl const PartialEq for Ordering {
885
889
#[ inline]
886
890
fn eq ( & self , other : & Self ) -> bool {
@@ -890,6 +894,7 @@ impl const PartialEq for Ordering {
890
894
891
895
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
892
896
#[ rustc_const_unstable( feature = "const_cmp" , issue = "92391" ) ]
897
+ #[ cfg( bootstrap) ]
893
898
impl const Ord for Ordering {
894
899
#[ inline]
895
900
fn cmp ( & self , other : & Ordering ) -> Ordering {
@@ -899,6 +904,7 @@ impl const Ord for Ordering {
899
904
900
905
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
901
906
#[ rustc_const_unstable( feature = "const_cmp" , issue = "92391" ) ]
907
+ #[ cfg( bootstrap) ]
902
908
impl const PartialOrd for Ordering {
903
909
#[ inline]
904
910
fn partial_cmp ( & self , other : & Ordering ) -> Option < Ordering > {
0 commit comments