-
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
Cleanup: Eliminate ConstnessAnd #91354
Conversation
This now causes a lot of queries to be executed twice, as reveal_all forces NotConst
…ension for it This breaks a ~const test that will be fixed in a follow up commit of this PR
…the same information
…se TraitPredicate instead
Nothing else makes sense, and there is no "danger" in doing so, as it only does something if there are const bounds, which are unstable. This used to happen implicitly via the inferctxt before, which was much more fragile.
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy Some changes occured to the CTFE / Miri engine cc @rust-lang/miri Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 8710a2e with merge 3bde14d5d8c5c093944947c2dfb90ea047842a0b... |
This comment has been minimized.
This comment has been minimized.
r? @spastorino Can't review a PR made up of mostly my own commits |
Tho... essentially @fee1-dead can review this, you only rebased it and fixed some tools. I guess r=oli-obk,fee1-dead if you are alright with my commits |
I don't think I can do that, as this PR requires some work (fixing the assoc type ui test), also improving caching of queries that do not care about constness if the performance had gotten worse. The ui test fix is quite simple. |
@bors r=spastorino |
📌 Commit 5ebc99e has been approved by |
I'm not sure how perf labelling works really but seems like we have cc @rust-lang/wg-compiler-performance |
perfbot always marks PRs with regressions as regressions. It automatically removes the label when there are no regressions, which is not the case for this PR. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (18bb8c6): comparison url. Summary: This change led to moderate relevant mixed results 🤷 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression |
I have an idea that could address the remaining regressions: https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/ParamEnv.20and.20constness/near/263477812 |
This seems to cause a regression, see #91489 |
Oof. That's quite odd. Let's revert this PR and go with a smaller subset of the changes first? |
Revert "Auto merge of rust-lang#91354 - fee1-dead:const_env, r=spastorino" This reverts commit 18bb8c6, reversing changes made to d9baa36. Reverts rust-lang#91354 in order to address rust-lang#91489. We would need to place this changes in a more granular way and would also be nice to address the small perf regression that was also introduced. r? `@oli-obk` cc `@fee1-dead`
Cleanup: Eliminate ConstnessAnd This is almost a behaviour-free change and purely a refactoring. "almost" because we appear to be using the wrong ParamEnv somewhere already, and this is now exposed by failing a test using the unstable `~const` feature. We most definitely need to review all `without_const` and at some point should probably get rid of many of them by using `TraitPredicate` instead of `TraitRef`. This is a continuation of rust-lang#90274. r? `@oli-obk` cc `@spastorino` `@ecstatic-morse`
This is almost a behaviour-free change and purely a refactoring. "almost" because we appear to be using the wrong ParamEnv somewhere already, and this is now exposed by failing a test using the unstable
~const
feature.We most definitely need to review all
without_const
and at some point should probably get rid of many of them by usingTraitPredicate
instead ofTraitRef
.This is a continuation of #90274.
r? @oli-obk
cc @spastorino @ecstatic-morse