I notice that core::cmp::Ordering examples refer to std::cmp::Ordering.
Is this intentional? If so, why? Or is it a documentation bug?
This is sort-of intentional necessary evil, due to how core
and std
are implemented.
The actual type and documentation lives in core
, and is only re-exported as-is by std. However, very few projects actually use core
directly (it's for no-std crates). Most users will read these docs through docs of std
, and it'd be equally confusing the other way if the std
docs referred to core
types.
1 Like