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 @@ -800,9 +800,12 @@ pub trait Ord: Eq + PartialOrd<Self> {
800
800
Self : Sized ,
801
801
Self : ~const Destruct ,
802
802
{
803
- // HACK(fee1-dead): go back to using `self.max_by(other, Ord::cmp)`
804
- // when trait methods are allowed to be used when a const closure is
805
- // expected.
803
+ #[ cfg( not( bootstrap) ) ]
804
+ {
805
+ max_by ( self , other, Ord :: cmp)
806
+ }
807
+
808
+ #[ cfg( bootstrap) ]
806
809
match self . cmp ( & other) {
807
810
Ordering :: Less | Ordering :: Equal => other,
808
811
Ordering :: Greater => self ,
@@ -827,9 +830,12 @@ pub trait Ord: Eq + PartialOrd<Self> {
827
830
Self : Sized ,
828
831
Self : ~const Destruct ,
829
832
{
830
- // HACK(fee1-dead): go back to using `self.min_by(other, Ord::cmp)`
831
- // when trait methods are allowed to be used when a const closure is
832
- // expected.
833
+ #[ cfg( not( bootstrap) ) ]
834
+ {
835
+ min_by ( self , other, Ord :: cmp)
836
+ }
837
+
838
+ #[ cfg( bootstrap) ]
833
839
match self . cmp ( & other) {
834
840
Ordering :: Less | Ordering :: Equal => self ,
835
841
Ordering :: Greater => other,
You can’t perform that action at this time.
0 commit comments