-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
First question mark in doctest #61990
Conversation
r? @bluss (rust_highfive has picked a reviewer for you, use r? to override) |
ping @QuietMisdreavus |
cc @rust-lang/docs We currently use an explicit |
I strongly approve this! It's removing |
So until #61277 is fixed, I'll add the explicit |
No, wait, that won't help with copying. On the other hand, adding |
IMO, for consistency, we should add the explicit |
Ok then. I'll update the PR shortly. |
@QuietMisdreavus updated. Does this look OK to you? |
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 great, thanks!
@bors r+ rollup |
📌 Commit ee05fc8 has been approved by |
…sdreavus First question mark in doctest We have had `?` for `Result`s in doctests for some time, but so far haven't used them in doctests. With this PR, I want to start the de-`unwrap`ping of doctests – and the discussion on where to do so. There is one downside, which is that the code can no longer be copied into a plain `main()` method, on the other hand, there should be a workable error if one does this.
We have had
?
forResult
s in doctests for some time, but so far haven't used them in doctests. With this PR, I want to start the de-unwrap
ping of doctests – and the discussion on where to do so.There is one downside, which is that the code can no longer be copied into a plain
main()
method, on the other hand, there should be a workable error if one does this.