Skip to content
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

Merged
merged 1 commit into from
Jan 12, 2018
Merged

Fix panic strings. #47307

merged 1 commit into from
Jan 12, 2018

Conversation

dlrobertson
Copy link
Contributor

  • 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"`

@rust-highfive
Copy link
Collaborator

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.

@@ -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.
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 10, 2018
 - Fix panic string in `check_ast_crate`.
@dlrobertson
Copy link
Contributor Author

Updated! Such a massive PR lol

@kennytm
Copy link
Member

kennytm commented Jan 10, 2018

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 10, 2018

📌 Commit c78679d has been approved by kennytm

@shepmaster
Copy link
Member

Such a massive PR lol

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 ;-)

kennytm added a commit to kennytm/rust that referenced this pull request Jan 11, 2018
…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
kennytm added a commit to kennytm/rust that referenced this pull request Jan 11, 2018
…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
bors added a commit that referenced this pull request Jan 11, 2018
Rollup of 12 pull requests

- Successful merges: #47283, #47288, #47289, #47298, #47305, #47307, #47310, #47322, #47324, #47328, #47340, #47344
- Failed merges:
bors added a commit that referenced this pull request Jan 12, 2018
Rollup of 12 pull requests

- Successful merges: #47283, #47288, #47289, #47298, #47305, #47307, #47310, #47322, #47324, #47328, #47340, #47344
- Failed merges:
kennytm added a commit to kennytm/rust that referenced this pull request Jan 12, 2018
…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
bors added a commit that referenced this pull request Jan 12, 2018
@bors bors merged commit c78679d into rust-lang:master Jan 12, 2018
@dlrobertson dlrobertson deleted the fix_panic_strings branch January 14, 2018 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants