-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Clean up const-hack PRs now that const if / match exist. #67657
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @oli-obk (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. |
Nah, if that is a new feature, we should do it in a separate PR, and this is in fact already happening: #66884 |
lgtm, but r? @Centril for the |
6dd3efc
to
91c2f78
Compare
@bors r=oli-obk |
📌 Commit 91c2f78 has been approved by |
Clean up const-hack PRs now that const if / match exist. Closes rust-lang#67627. Cleans up these merged PRs tagged with `const-hack`: - rust-lang#63810 - rust-lang#63786 - rust-lang#61635 - rust-lang#58044 reverting their contents to have the match or if expressions they originally contained. r? @oli-obk There's one more PR in those tagged with `const-hack` that originally wasn't merged (rust-lang#65107). Reading the thread, it looks like it was originally closed because the `const-hack` for the checked arithmetic non-negligibly hurt performance, and because there was no way to manipulate the returned Option at compile time anyway (with neither const if nor const match). Would you like me to add these changes to the changes from this PR here too, now that we have the necessary features?
Rollup of 10 pull requests Successful merges: - #64273 (Stabilize attribute macros on inline modules) - #67287 (typeck: note other end-point when checking range pats) - #67564 (docs: Iterator adapters have unspecified results after a panic) - #67622 (Some keyword documentation.) - #67657 (Clean up const-hack PRs now that const if / match exist.) - #67677 (resolve: Minor cleanup of duplicate macro reexports) - #67687 (Do not ICE on lifetime error involving closures) - #67698 (Move reachable_set and diagnostic_items to librustc_passes.) - #67701 (tidy: Enforce formatting rather than just check it if `--bless` is specified) - #67715 (Typo fix) Failed merges: r? @ghost
The same problem as in rust-lang#65023 was introduced by rust-lang#67657. This works around the current incrcomp issue with these attributes by allowing it here.
Fix incremental builds of core by allowing unused attribute. I *think* that the same problem as in rust-lang#65023 was introduced by rust-lang#67657. This works around the current incrcomp issue with these attributes by allowing it here. This resolves the near-term issue for me, at least.
Closes #67627.
Cleans up these merged PRs tagged with
const-hack
:const fn
#63810abs
,wrapping_abs
,overflowing_abs
const functions #63786i*::signum
aconst fn
. #61635reverting their contents to have the match or if expressions they originally contained.
r? @oli-obk
There's one more PR in those tagged with
const-hack
that originally wasn't merged (#65107). Reading the thread, it looks like it was originally closed because theconst-hack
for the checked arithmetic non-negligibly hurt performance, and because there was no way to manipulate the returned Option at compile time anyway (with neither const if nor const match). Would you like me to add these changes to the changes from this PR here too, now that we have the necessary features?