Simplify rustc_public context handling#147923
Conversation
|
|
|
☔ The latest upstream changes (presumably #147928) made this pull request unmergeable. Please resolve the merge conflicts. |
6ef263f to
604d30b
Compare
|
Are you able to take this one? It looks like @oli-obk is off. |
|
|
|
r? stable-mir |
|
Failed to set assignee to
|
|
Not working on Rust for a while unfortunately. |
|
r? project-stable-mir |
|
Since this is stable MIR and shouldn't impact other stuff I can attempt to review this, albeit without knowing much about the specific details of what it's doing. Looks like there's a conflict right now, though? |
|
I can review, I just can't be on the rotation rn |
|
r=me after rebase |
We no longer need two thread-local variables to store the context. We used to have two because the conversion logic used to live in a separate crate from the rest of the business logic. I'm also removing the Container struct and replacing the CompilerInterface trait with a struct. This removes the unnecessary indirection and code duplication. Using a trait would also block us from adding any generic method to the compiler interface.
604d30b to
e0b8dd3
Compare
|
This PR was rebased onto a different master 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. |
Simplify rustc_public context handling We no longer need two thread-local variables to store the context. We used to have two because the conversion logic used to live in a separate crate from the rest of the business logic. I'm also merging the Container struct and the CompilerInterface trait as a single struct. This removes the unnecessary indirection and code duplication. Using a trait would also block us from adding any generic method to the compiler interface. r? `@oli-obk` cc: `@makai410`
Rollup of 9 pull requests Successful merges: - #138217 (Turn `Cow::is_borrowed,is_owned` into associated functions.) - #147858 (Micro-optimization attempt in coroutine layout computation) - #147923 (Simplify rustc_public context handling) - #147935 (Add LLVM realtime sanitizer) - #148115 (rustdoc: Rename unstable option `--nocapture` to `--no-capture` in accordance with `libtest`) - #148137 (Couple of changes for Redox OS) - #148176 ([rustdoc] Include attribute and derive macros when filtering on "macros") - #148193 (Remove `QPath::LangItem`) - #148253 (Handle default features and -Ctarget-features in the dummy backend) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - #138217 (Turn `Cow::is_borrowed,is_owned` into associated functions.) - #147858 (Micro-optimization attempt in coroutine layout computation) - #147923 (Simplify rustc_public context handling) - #148115 (rustdoc: Rename unstable option `--nocapture` to `--no-capture` in accordance with `libtest`) - #148137 (Couple of changes for Redox OS) - #148176 ([rustdoc] Include attribute and derive macros when filtering on "macros") - #148253 (Handle default features and -Ctarget-features in the dummy backend) - #148272 (Align VEX V5 boot routine to 4 bytes) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #147923 - celinval:rpub-remove-trait, r=oli-obk Simplify rustc_public context handling We no longer need two thread-local variables to store the context. We used to have two because the conversion logic used to live in a separate crate from the rest of the business logic. I'm also merging the Container struct and the CompilerInterface trait as a single struct. This removes the unnecessary indirection and code duplication. Using a trait would also block us from adding any generic method to the compiler interface. r? ``@oli-obk`` cc: ``@makai410``
Rollup of 8 pull requests Successful merges: - rust-lang/rust#138217 (Turn `Cow::is_borrowed,is_owned` into associated functions.) - rust-lang/rust#147858 (Micro-optimization attempt in coroutine layout computation) - rust-lang/rust#147923 (Simplify rustc_public context handling) - rust-lang/rust#148115 (rustdoc: Rename unstable option `--nocapture` to `--no-capture` in accordance with `libtest`) - rust-lang/rust#148137 (Couple of changes for Redox OS) - rust-lang/rust#148176 ([rustdoc] Include attribute and derive macros when filtering on "macros") - rust-lang/rust#148253 (Handle default features and -Ctarget-features in the dummy backend) - rust-lang/rust#148272 (Align VEX V5 boot routine to 4 bytes) r? `@ghost` `@rustbot` modify labels: rollup
Simplify rustc_public context handling We no longer need two thread-local variables to store the context. We used to have two because the conversion logic used to live in a separate crate from the rest of the business logic. I'm also merging the Container struct and the CompilerInterface trait as a single struct. This removes the unnecessary indirection and code duplication. Using a trait would also block us from adding any generic method to the compiler interface. r? ``@oli-obk`` cc: ``@makai410``
Rollup of 8 pull requests Successful merges: - rust-lang#138217 (Turn `Cow::is_borrowed,is_owned` into associated functions.) - rust-lang#147858 (Micro-optimization attempt in coroutine layout computation) - rust-lang#147923 (Simplify rustc_public context handling) - rust-lang#148115 (rustdoc: Rename unstable option `--nocapture` to `--no-capture` in accordance with `libtest`) - rust-lang#148137 (Couple of changes for Redox OS) - rust-lang#148176 ([rustdoc] Include attribute and derive macros when filtering on "macros") - rust-lang#148253 (Handle default features and -Ctarget-features in the dummy backend) - rust-lang#148272 (Align VEX V5 boot routine to 4 bytes) r? `@ghost` `@rustbot` modify labels: rollup
Simplify rustc_public context handling We no longer need two thread-local variables to store the context. We used to have two because the conversion logic used to live in a separate crate from the rest of the business logic. I'm also merging the Container struct and the CompilerInterface trait as a single struct. This removes the unnecessary indirection and code duplication. Using a trait would also block us from adding any generic method to the compiler interface. r? ``@oli-obk`` cc: ``@makai410``
Rollup of 8 pull requests Successful merges: - rust-lang#138217 (Turn `Cow::is_borrowed,is_owned` into associated functions.) - rust-lang#147858 (Micro-optimization attempt in coroutine layout computation) - rust-lang#147923 (Simplify rustc_public context handling) - rust-lang#148115 (rustdoc: Rename unstable option `--nocapture` to `--no-capture` in accordance with `libtest`) - rust-lang#148137 (Couple of changes for Redox OS) - rust-lang#148176 ([rustdoc] Include attribute and derive macros when filtering on "macros") - rust-lang#148253 (Handle default features and -Ctarget-features in the dummy backend) - rust-lang#148272 (Align VEX V5 boot routine to 4 bytes) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - rust-lang/rust#138217 (Turn `Cow::is_borrowed,is_owned` into associated functions.) - rust-lang/rust#147858 (Micro-optimization attempt in coroutine layout computation) - rust-lang/rust#147923 (Simplify rustc_public context handling) - rust-lang/rust#148115 (rustdoc: Rename unstable option `--nocapture` to `--no-capture` in accordance with `libtest`) - rust-lang/rust#148137 (Couple of changes for Redox OS) - rust-lang/rust#148176 ([rustdoc] Include attribute and derive macros when filtering on "macros") - rust-lang/rust#148253 (Handle default features and -Ctarget-features in the dummy backend) - rust-lang/rust#148272 (Align VEX V5 boot routine to 4 bytes) r? `@ghost` `@rustbot` modify labels: rollup
We no longer need two thread-local variables to store the context. We used to have two because the conversion logic used to live in a separate crate from the rest of the business logic.
I'm also merging the Container struct and the CompilerInterface trait as a single struct. This removes the unnecessary indirection and code duplication. Using a trait would also block us from adding any generic method to the compiler interface.
r? @oli-obk
cc: @makai410