Open
Description
This is currently in beta; not yet in stable.
The beta docs (here) show that the PartialEq
and PartialOrd
implementations of std::cmp::Ordering
are const
.
Same for TypeId
(only in nightly for now).
Both use derive_const
to generate the trait implementations.
Const traits do not work outside nigthly, and only with feature const_trait_impl
enabled, so they should not be marked as such in the documentation.
Trying to use these methods in a const context gives an error, as intended:
https://play.rust-lang.org/?version=beta&mode=debug&edition=2021&gist=bba4e8edb1baa3743739b3cb207e6892