-
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
Update tests to remove old numeric constants #78380
Conversation
r? @shepmaster (rust_highfive has picked a reviewer for you, use r? to override) |
fn main() { | ||
match 0usize { //~ERROR non-exhaustive patterns: `_` not covered | ||
0..=MAX => {} | ||
0..=usize::MAX => {} |
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.
Wow, what a confusing error.
error[E0004]: non-exhaustive patterns: `_` not covered
--> src/main.rs:2:11
|
2 | match 0usize { //~ERROR non-exhaustive patterns: `_` not covered
| ^^^^^^ pattern `_` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
Seems like a strange rule.
@bors r+ |
📌 Commit 7373754f0f3f025d8ae06b9191a2ab01f2bfd3ff has been approved by |
⌛ Testing commit 7373754f0f3f025d8ae06b9191a2ab01f2bfd3ff with merge 4b5f7891fc2656006e293377b449a93d820562f5... |
💔 Test failed - checks-actions |
Spurious failure.
@bors retry |
⌛ Testing commit 7373754f0f3f025d8ae06b9191a2ab01f2bfd3ff with merge 35fb0bbeabbb6130a62bc71c4396e5aa470b5adf... |
💔 Test failed - checks-actions |
Same issue as before. Going to avoid retrying until the underlying cause is fixed, see https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/pinging.20for.20zlib.20error if you're interested. |
No problem, thanks for your effort! |
It's been a while, but now there's a conflict. Probably about time to try again. r? @jyn514 |
… r=jyn514 Update tests to remove old numeric constants Part of rust-lang#68490. Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros. For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed.
@bors r- This failed in #79165 on Looks like this PR updated |
☔ The latest upstream changes (presumably #79243) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
ping @bstrie - are you planning to work on this in the near future? |
FWIW I would be ok with dropping the changes that have run into conflicts and making them later when there are fewer overall changes to make. |
Part of rust-lang#68490. Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros. For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed.
7edc4f2
to
90a2e5e
Compare
@bstrie: 🔑 Insufficient privileges: Not in reviewers |
@jyn514 All rebased, whenever you have a moment. :) |
@bors r+ |
📌 Commit 90a2e5e has been approved by |
Thanks for working on this! |
☀️ Test successful - checks-actions |
Part of #68490.
Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros.
For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed.