add const hack comment
This commit is contained in:
parent
a89510e5f9
commit
65fca6db19
@ -802,6 +802,9 @@ pub trait Ord: Eq + PartialOrd<Self> {
|
|||||||
Self: Sized,
|
Self: Sized,
|
||||||
Self: ~const Destruct,
|
Self: ~const Destruct,
|
||||||
{
|
{
|
||||||
|
// HACK(fee1-dead): go back to using `self.max_by(other, Ord::cmp)`
|
||||||
|
// when trait methods are allowed to be used when a const closure is
|
||||||
|
// expected.
|
||||||
match self.cmp(&other) {
|
match self.cmp(&other) {
|
||||||
Ordering::Less | Ordering::Equal => other,
|
Ordering::Less | Ordering::Equal => other,
|
||||||
Ordering::Greater => self,
|
Ordering::Greater => self,
|
||||||
@ -826,6 +829,9 @@ pub trait Ord: Eq + PartialOrd<Self> {
|
|||||||
Self: Sized,
|
Self: Sized,
|
||||||
Self: ~const Destruct,
|
Self: ~const Destruct,
|
||||||
{
|
{
|
||||||
|
// HACK(fee1-dead): go back to using `self.min_by(other, Ord::cmp)`
|
||||||
|
// when trait methods are allowed to be used when a const closure is
|
||||||
|
// expected.
|
||||||
match self.cmp(&other) {
|
match self.cmp(&other) {
|
||||||
Ordering::Less | Ordering::Equal => self,
|
Ordering::Less | Ordering::Equal => self,
|
||||||
Ordering::Greater => other,
|
Ordering::Greater => other,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user