-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Update Result docs to the new guarantees #124870
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
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine except for the unrelated changes.
The option module page currently is the central place for NPO documentation. If Result gets those too then things become more scattered. Maybe the Option page should also link to the Result page. |
How exactly do you think that would look @the8472 ? The current wording is intended to be a "one way" lookup. "if X is the case, you can count on Y too", but since the guaranteed effects are part of Option then I'm not sure how Option would refer to Result. |
Maybe
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you!
@bors r+ rollup |
Why is this "closed", not "merged"? Something seems to have gone wrong? (Also the commits would ideally have been squashed before landing this, no need to have all these 1-line-fixup commits perpetually in the git history...) |
i thought it was handled by bors >.> |
Normally bors does nothing, Github marks a PR as merged when its commits all landed.
|
https://github.com/rust-lang/rust/blob/master/library/core/src/result.rs#L231-L250 the PR's changes do seem to be in the |
Yeah, 9b480da got merged. No idea why this is not reflected in the PR state. |
Note: This PR did get merged, even though Github claims it did not.
The
Option
docs already explain the guarantees given in RFC 3391, so all that we need is a paragraph saying that someResult
type combinations will also qualify.Part of #110503