Do not modify resolver outputs during lowering#155460
Do not modify resolver outputs during lowering#155460cjgillot wants to merge 4 commits intorust-lang:mainfrom
Conversation
|
Some changes occurred in compiler/rustc_ast_lowering/src/format.rs cc @m-ou-se |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Do not modify resolver outputs during lowering
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (fd1275a): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.8%, secondary 3.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -3.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 490.91s -> 488.306s (-0.53%) |
| } | ||
|
|
||
| let def_id = self.get_partial_res(expr.id)?.full_res()?.opt_def_id()?; | ||
| let def_id = self.partial_res_map.get(&expr.id)?.full_res()?.opt_def_id()?; |
There was a problem hiding this comment.
This is a bit suspicious, why are we using partial_res_map directly instead of get_partial_res here?
1e6ae8e to
a9cee38
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors try @rust-timer queue |
|
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
|
⌛ Trying commit a9cee38 with merge 1c6d6e2… To cancel the try build, run the command Workflow: https://github.com/rust-lang/rust/actions/runs/24752555469 |
Do not modify resolver outputs during lowering
Split from #142830
I believe this achieves the same thing as #153656 but in a much simpler way.
This PR forces AST->HIR lowering to stop mutating resolver outputs. Instead, it manages a few override maps that only live during lowering and are dropped afterwards.
r? @petrochenkov
cc @aerooneqq