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

Do fix_*_builtin_expr hacks on the writeback results #112410

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

compiler-errors
Copy link
Member

During writeback, we do fix_{scalar,index}_builtin_expr so that during MIR build we generate built-in MIR instructions instead of method calls for certain built-in arithmetic operations. We do this by checking the types of these built-in operations are scalar types, and remove the method def-id to essentially mark the operation as built-in and not "overloaded".

For lazy norm and the new trait solver, this is a problem, because we don't actually normalize all the types we end up seeing in the typeck results until they're copied over writeback's copy of the typeck results. To fix this, delay these fixup calls until after this normalization has been done.

This doesn't affect the old trait solver, but does simplify the code a bit IMO, since we can remove a few sets of calls to resolve_vars_if_possible and some borrow_muts.

r? @lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 8, 2023
@lcnr
Copy link
Contributor

lcnr commented Jun 8, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 8, 2023

📌 Commit 8efcb28 has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 8, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 8, 2023
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#109953 (Use 128 bits for TypeId hash)
 - rust-lang#112333 (Don't hold the active queries lock while calling `make_query`)
 - rust-lang#112339 (Fix rust-analyzer proc macro server)
 - rust-lang#112410 (Do `fix_*_builtin_expr` hacks on the writeback results)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 909bfa3 into rust-lang:master Jun 8, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 8, 2023
@compiler-errors compiler-errors deleted the writeback branch August 11, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants