File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -798,9 +798,12 @@ pub trait Ord: Eq + PartialOrd<Self> {
798
798
Self : Sized ,
799
799
Self : ~const Destruct ,
800
800
{
801
- // HACK(fee1-dead): go back to using `self.max_by(other, Ord::cmp)`
802
- // when trait methods are allowed to be used when a const closure is
803
- // expected.
801
+ #[ cfg( not( bootstrap) ) ]
802
+ {
803
+ max_by ( self , other, Ord :: cmp)
804
+ }
805
+
806
+ #[ cfg( bootstrap) ]
804
807
match self . cmp ( & other) {
805
808
Ordering :: Less | Ordering :: Equal => other,
806
809
Ordering :: Greater => self ,
@@ -825,9 +828,12 @@ pub trait Ord: Eq + PartialOrd<Self> {
825
828
Self : Sized ,
826
829
Self : ~const Destruct ,
827
830
{
828
- // HACK(fee1-dead): go back to using `self.min_by(other, Ord::cmp)`
829
- // when trait methods are allowed to be used when a const closure is
830
- // expected.
831
+ #[ cfg( not( bootstrap) ) ]
832
+ {
833
+ min_by ( self , other, Ord :: cmp)
834
+ }
835
+
836
+ #[ cfg( bootstrap) ]
831
837
match self . cmp ( & other) {
832
838
Ordering :: Less | Ordering :: Equal => self ,
833
839
Ordering :: Greater => other,
You can’t perform that action at this time.
0 commit comments