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> {
800800 Self : Sized ,
801801 Self : ~const Destruct ,
802802 {
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) ]
806809 match self . cmp ( & other) {
807810 Ordering :: Less | Ordering :: Equal => other,
808811 Ordering :: Greater => self ,
@@ -827,9 +830,12 @@ pub trait Ord: Eq + PartialOrd<Self> {
827830 Self : Sized ,
828831 Self : ~const Destruct ,
829832 {
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) ]
833839 match self . cmp ( & other) {
834840 Ordering :: Less | Ordering :: Equal => self ,
835841 Ordering :: Greater => other,
You can’t perform that action at this time.
0 commit comments