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> {
798798 Self : Sized ,
799799 Self : ~const Destruct ,
800800 {
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) ]
804807 match self . cmp ( & other) {
805808 Ordering :: Less | Ordering :: Equal => other,
806809 Ordering :: Greater => self ,
@@ -825,9 +828,12 @@ pub trait Ord: Eq + PartialOrd<Self> {
825828 Self : Sized ,
826829 Self : ~const Destruct ,
827830 {
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) ]
831837 match self . cmp ( & other) {
832838 Ordering :: Less | Ordering :: Equal => self ,
833839 Ordering :: Greater => other,
You can’t perform that action at this time.
0 commit comments