-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
More codegen cleanups #112830
More codegen cleanups #112830
Conversation
r? @jackh726 (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with nit
r? @oli-obk |
This comment has been minimized.
This comment has been minimized.
They both match on a `WorkItem`. It's simpler to do it all in one place.
There's no need to store it in `Queries`. We can just use a local variable, because it's always used shortly after it's produced. The commit also removes the `tcx.analysis()` call in `ongoing_codegen`, because it's easy to ensure that's done beforehand. All this makes the dataflow within `run_compiler` easier to follow, at the cost of making one test slightly more verbose, which I think is a good tradeoff.
d44cf57
to
1da1348
Compare
The first commit caused the crash, and I don't understand why. I have removed it, I'll try doing it in a separate PR. The other two commits can be merged here. @bors r=oli-obk rollup |
Rollup of 6 pull requests Successful merges: - rust-lang#112632 (Implement PartialOrd for `Vec`s over different allocators) - rust-lang#112759 (Make closure_saved_names_of_captured_variables a query. ) - rust-lang#112772 (Add a fully fledged `Clause` type, rename old `Clause` to `ClauseKind`) - rust-lang#112790 (Syntactically accept `become` expressions (explicit tail calls experiment)) - rust-lang#112830 (More codegen cleanups) - rust-lang#112844 (Add retag in MIR transform: `Adt` for `Unique` may contain a reference) r? `@ghost` `@rustbot` modify labels: rollup
It was because I changed the type of |
Rollup of 6 pull requests Successful merges: - rust-lang#112632 (Implement PartialOrd for `Vec`s over different allocators) - rust-lang#112759 (Make closure_saved_names_of_captured_variables a query. ) - rust-lang#112772 (Add a fully fledged `Clause` type, rename old `Clause` to `ClauseKind`) - rust-lang#112790 (Syntactically accept `become` expressions (explicit tail calls experiment)) - rust-lang#112830 (More codegen cleanups) - rust-lang#112844 (Add retag in MIR transform: `Adt` for `Unique` may contain a reference) r? `@ghost` `@rustbot` modify labels: rollup
Some additional cleanups I found while looking closely at this code, following up from #112827.
r= @oli-obk