-
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
Clarify "It is an error to..." wording for zero-duration behaviors. #48328
Clarify "It is an error to..." wording for zero-duration behaviors. #48328
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @sfackler i'm interested in doing the integration test thing you mentioned in the github issue, but i'll do that in a separate pr |
88973b6
to
19fa3da
Compare
@@ -282,6 +284,20 @@ impl TcpStream { | |||
/// .expect("Couldn't connect to the server..."); | |||
/// stream.set_read_timeout(None).expect("set_read_timeout call failed"); | |||
/// ``` | |||
/// | |||
/// An [`Err`] is returned if the zero [`Duration`] is passed to this |
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.
I don't know if we need to have an explicit example of an invalid call.
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.
We talked about it at the docs team meeting, and everyone was generally in favor of showing off error conditions.
19fa3da
to
bb2fae6
Compare
bb2fae6
to
931087c
Compare
☔ The latest upstream changes (presumably #48399) made this pull request unmergeable. Please resolve the merge conflicts. |
Documentation fix side of rust-lang#48311.
931087c
to
0700bd1
Compare
tests are passing now, let me know if anyone sees anything else! |
Heads-up @sfackler, this is ready for re-review. |
@bors r+ |
📌 Commit 0700bd1 has been approved by |
…o-duration, r=sfackler Fixes rust-lang#47311. r? @nrc
Documentation fix side of #48311.