-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Description
Problem
<=,<,>, and>=are currently a type of builtin functions that require special handling e.g. in the monomorphizer and during type-checking- Being a type of builtin function, it's not currently possible to optimize
<=, etc. in cases where they could be more efficient than e.g.a.cmp(b) != Ordering::Greater
Happy Case
- Add
Ord::le,Ord::lt, etc. to theOrdcase with default method implementations as specified in the monomorphizer, e.g.
pub trait Ord {
fn cmp(self, other: Self) -> Ordering;
fn le(self, other: Self) -> bool {
}
}
- Have
<=resolve toOrd::le, etc. - Remove the special
is_ordcase added in fix: add missing unification totype_check_operator_method#11353 - Consider adding
Eq::neas well or making a follow up issue for it
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
Metadata
Metadata
Assignees
Labels
No labels