-
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
Fix panic strings. #47307
Fix panic strings. #47307
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @shepmaster (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
src/libstd/time/duration.rs
Outdated
@@ -290,7 +290,7 @@ impl Duration { | |||
} | |||
|
|||
/// Checked `Duration` subtraction. Computes `self - other`, returning [`None`] | |||
/// if the result would be negative or if overflow occurred. | |||
/// if underflow or overflow occurred. |
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.
Please revert these changes. The term "overflow" is correct, see #46898.
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.
👍
- Fix panic string in `check_ast_crate`.
ce22894
to
c78679d
Compare
Updated! Such a massive PR lol |
Thanks! @bors r+ rollup |
📌 Commit c78679d has been approved by |
On the flip side, a lot of times the smallest changes are the ones you have to scrutinize the hardest. It's nice to have easier ones every so often ;-) |
…nnytm Fix panic strings. - Fix panic string in `check_ast_crate`. - Update panic string for Duration subtraction on overflow/underflow. Not sure if the changes to `Duration` are helpful/needed. Mostly just a nit. Otherwise this is just a one character change :) On another note: I hit the panic in `check_ast_crate` when compiling [m-labs/smoltcp] with the following: ``` cargo test --doc --no-default-features --features "std socket-raw"` ``` [m-labs/smoltcp]: https://github.com/m-labs/smoltcp
…nnytm Fix panic strings. - Fix panic string in `check_ast_crate`. - Update panic string for Duration subtraction on overflow/underflow. Not sure if the changes to `Duration` are helpful/needed. Mostly just a nit. Otherwise this is just a one character change :) On another note: I hit the panic in `check_ast_crate` when compiling [m-labs/smoltcp] with the following: ``` cargo test --doc --no-default-features --features "std socket-raw"` ``` [m-labs/smoltcp]: https://github.com/m-labs/smoltcp
…nnytm Fix panic strings. - Fix panic string in `check_ast_crate`. - Update panic string for Duration subtraction on overflow/underflow. Not sure if the changes to `Duration` are helpful/needed. Mostly just a nit. Otherwise this is just a one character change :) On another note: I hit the panic in `check_ast_crate` when compiling [m-labs/smoltcp] with the following: ``` cargo test --doc --no-default-features --features "std socket-raw"` ``` [m-labs/smoltcp]: https://github.com/m-labs/smoltcp
check_ast_crate
.Not sure if the changes to
Duration
are helpful/needed. Mostly just a nit.Otherwise this is just a one character change :)
On another note: I hit the panic in
check_ast_crate
when compilingm-labs/smoltcp with the following: