-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option and Result are missing documentation on their internal order #87238
Comments
@rustbot claim |
Looking into this: the instances in those cases are derived, and it looks like adding extra documentation to derived traits has been proposed previously (#44118) but is not currently supported. So by the looks of it this is not feasible without changes to rustdoc? |
You could replace the derived implementation with an equivalent explicit one, and then add a comment. |
@rustbot release-assignment
|
…oc, r=scottmcm Add documentation for the order of Option and Result This resolves issue rust-lang#87238.
Looks like this issue was addressed in #87654. |
Option<T>
whereT: Ord
implementsOrd
(and similarly forPartialOrd
), but as far as I can see the order it uses isn't documented anywhere. You have to read the source to find out that itsOrd
implementation isderive
d, and thatNone
comes beforeSome
in theenum
declaration thusNone
sorts beforeSome
. I think that should be documented.The same issue also appears to apply to
Result
.The text was updated successfully, but these errors were encountered: