You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This doesn't directly address your issue but most types have standard comparison functions defined, like uint::le. There's an additional problem with them though, that they are usually defined with by-value parameters, but generic functions expect by-ref parameters. We could also define something like core::univ that defines all the universal operators over generic types, like eq, ne, lt, gt, le, ge.
I agree with @Dretch that this is a nice idea (I used it all the time in Haskell), but in general, we're trying to remove features from the language rather than add them. If you are passionate about it, though, please open a new bug and follow the RFC process: https://github.com/mozilla/rust/wiki/Note-RFC-process
Activity
brson commentedon Mar 26, 2012
This doesn't directly address your issue but most types have standard comparison functions defined, like
uint::le. There's an additional problem with them though, that they are usually defined with by-value parameters, but generic functions expect by-ref parameters. We could also define something likecore::univthat defines all the universal operators over generic types, like eq, ne, lt, gt, le, ge.catamorphism commentedon Apr 19, 2012
I agree with @Dretch that this is a nice idea (I used it all the time in Haskell), but in general, we're trying to remove features from the language rather than add them. If you are passionate about it, though, please open a new bug and follow the RFC process: https://github.com/mozilla/rust/wiki/Note-RFC-process
Closing this for now.
Merge pull request rust-lang#2052 from RalfJung/avoid-simd-minmax
Use chalk fork to paper over rust-lang#2052
Merge rust-lang#2408