-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add EarlyBinder #96883
Add EarlyBinder #96883
Conversation
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
Do you have some links to related chalk docs or discussions? Or maybe a sentence or two of where this is going/motivation for the change |
@oli-obk I don't have any links to discussions atm, but I've updated the OP with a short explanation. |
Thanks, that makes a lot of sense. Even on its own this PR seems like a step forward. Two things:
|
☔ The latest upstream changes (presumably #96904) made this pull request unmergeable. Please resolve the merge conflicts. |
Okay, this is at a place that I think it's worth landing now than iterating more before merging. Basically, the only thing more complicated than "just add |
This comment has been minimized.
This comment has been minimized.
welp what did I do |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Looks like a small diagnostics regression with the spans that are used in cycles. Usually related to One thing that stood out to me was the fact that the field on the EarlyBinder is public. Once there are fewer early binder construction sites, we should probably make it private and have a Modulo CI passing and some span shenanigans, r=me |
@bors r=oli-obk |
📌 Commit 06a1e88 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (2a8a0fc): comparison url. Summary:
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 Footnotes |
cachegrind gives me the following, which mostly looks like inlining noise to me?
|
@jackh726 @oli-obk The regressions are exclusively in bitmaps-3.1.0 in both full and incr-full scenarios. This benchmark stresses trait related code. It looks like I'm surprised this impacted one benchmark so thoroughly without impacting others (e.g., Diesel). Any other thoughts on what might be happening here? |
I honestly just think this is just inlining noise. I'm not sure what might be different about |
Status: Compilation succeeds but regression fails due to new intrinsic. Relevant changes: - rust-lang/rust#95837 - rust-lang/rust#95562 - rust-lang/rust#96883
Add EarlyBinder Chalk has no concept of `Param` (https://github.com/rust-lang/chalk/blob/e0ade19d139bc784384acc6736cd960c91dd55a1/chalk-ir/src/lib.rs#L579) or `ReEarlyBound` (https://github.com/rust-lang/chalk/blob/e0ade19d139bc784384acc6736cd960c91dd55a1/chalk-ir/src/lib.rs#L1308). Everything is just "bound" - the equivalent of rustc's late-bound. It's not completely clear yet whether to move everything to the same time of binder in rustc or add `Param` and `ReEarlyBound` in Chalk. Either way, tracking when we have or haven't already substituted out these in rustc can be helpful. As a first step, I'm just adding a `EarlyBinder` newtype that is required to call `subst`. I also add a couple "transparent" `bound_*` wrappers around a couple query that are often immediately substituted. r? `@nikomatsakis`
* Update rust toolchain to 2022-05-17 Status: Compilation succeeds but regression fails due to new intrinsic. Relevant changes: - rust-lang/rust#95837 - rust-lang/rust#95562 - rust-lang/rust#96883 * Implement new intrinsic ptr_offset_from_unsigned This new intrinsic is used in many different places in the standard library and it was failing some tests for vectors. * Apply suggestions from code review Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com> * Address PR comments - Fix order of checks. - Improve error message. - Add comments to the new tests. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
Chalk has no concept of
Param
(https://github.com/rust-lang/chalk/blob/e0ade19d139bc784384acc6736cd960c91dd55a1/chalk-ir/src/lib.rs#L579) orReEarlyBound
(https://github.com/rust-lang/chalk/blob/e0ade19d139bc784384acc6736cd960c91dd55a1/chalk-ir/src/lib.rs#L1308). Everything is just "bound" - the equivalent of rustc's late-bound. It's not completely clear yet whether to move everything to the same time of binder in rustc or addParam
andReEarlyBound
in Chalk.Either way, tracking when we have or haven't already substituted out these in rustc can be helpful.
As a first step, I'm just adding a
EarlyBinder
newtype that is required to callsubst
. I also add a couple "transparent"bound_*
wrappers around a couple query that are often immediately substituted.r? @nikomatsakis