compiler: {TyAnd,}Layout
comes home by workingjubilee · Pull Request #131473 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation8 Commits3 Checks6 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
The Layout
and TyAndLayout
types are heavily abstract and have no particular target-specific qualities, though we do use them to answer questions particular to targets. We can keep it that way if we simply move them out of rustc_target
and into rustc_abi
. They bring a small entourage of connected types with them, but that's fine.
This will allow us to strengthen a few abstraction barriers over time and thus make the notoriously gnarly layout code easier to refactor. For now, we don't need to worry about that and deliberately use reexports to minimize this particular diff.
r? @Nadrieril
rustbot has assigned @Nadrieril.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r?
to explicitly pick a reviewer
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
These commits modify the Cargo.lock
file. Unintentional changes to Cargo.lock
can be introduced when switching branches and rebasing PRs.
If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.
Some changes occurred in compiler/rustc_codegen_gcc
Some changes occurred to the CTFE / Miri interpreter
cc @rust-lang/miri
Some changes occurred in compiler/rustc_codegen_cranelift
cc @bjorn3
Status: Blocked on something else such as an RFC or other implementation work.
label
I am approaching this very incrementally to avoid Rebase Hell. I have peeked ahead a few commits and the next steps (removing all the reexports, thus redirecting imports from rustc_target
to rustc_abi
) involve touching more-or-less the entire tree. Fortunately, those commits will be possible to land in parallel after this.
@rustbot ready
workingjubilee removed the S-blocked
Status: Blocked on something else such as an RFC or other implementation work.
label
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The organization after this PR looks definitely more sane to me 👍 I don't work with ABI/codegen/target enough so won't r+ as I imagine other compiler reviewers will have a better gauge on this.
This finally unites TyAndLayout, Layout, and LayoutS into the same crate, as one might imagine they would be placed. No functional changes.
@bors r+
If this is part of a larger effort, @workingjubilee can you link to that from this PR or mention this PR on the larger PR? Just so it's easier to follow the plot in GitHub, the code here is good to go.
📌 Commit 1072190 has been approved by saethlin
It is now in the queue for this repository.
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
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
…=saethlin
compiler: {TyAnd,}Layout
comes home
The Layout
and TyAndLayout
types are heavily abstract and have no particular target-specific qualities, though we do use them to answer questions particular to targets. We can keep it that way if we simply move them out of rustc_target
and into rustc_abi
. They bring a small entourage of connected types with them, but that's fine.
This will allow us to strengthen a few abstraction barriers over time and thus make the notoriously gnarly layout code easier to refactor. For now, we don't need to worry about that and deliberately use reexports to minimize this particular diff.
Oh, sure!
#131424 was the PR before this, the followups will link back to this one or maybe I'll make an issue. Basically we started migrating important components of layout code into rustc_abi
... 2 years ago.. and never actually finished it, and all of the things I've even tried to work on for five minutes lately are made harder by the intense cross-crate couplings (that are cut very oddly, to boot).
bors added a commit to rust-lang-ci/rust that referenced this pull request
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#128967 (std::fs::get_path freebsd update.)
- rust-lang#130629 (core/net: add Ipv[46]Addr::from_octets, Ipv6Addr::from_segments.)
- rust-lang#131274 (library: Const-stabilize
MaybeUninit::assume_init_mut
) - rust-lang#131473 (compiler:
{TyAnd,}Layout
comes home) - rust-lang#131533 (emscripten: Use the latest emsdk 3.1.68)
- rust-lang#131593 (miri: avoid cloning AllocExtra)
- rust-lang#131616 (merge const_ipv4 / const_ipv6 feature gate into 'ip' feature gate)
- rust-lang#131660 (Also use outermost const-anon for impl items in
non_local_defs
lint)
r? @ghost
@rustbot
modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#128967 (std::fs::get_path freebsd update.)
- rust-lang#130629 (core/net: add Ipv[46]Addr::from_octets, Ipv6Addr::from_segments.)
- rust-lang#131274 (library: Const-stabilize
MaybeUninit::assume_init_mut
) - rust-lang#131473 (compiler:
{TyAnd,}Layout
comes home) - rust-lang#131533 (emscripten: Use the latest emsdk 3.1.68)
- rust-lang#131593 (miri: avoid cloning AllocExtra)
- rust-lang#131616 (merge const_ipv4 / const_ipv6 feature gate into 'ip' feature gate)
- rust-lang#131660 (Also use outermost const-anon for impl items in
non_local_defs
lint)
r? @ghost
@rustbot
modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#128967 (std::fs::get_path freebsd update.)
- rust-lang#130629 (core/net: add Ipv[46]Addr::from_octets, Ipv6Addr::from_segments.)
- rust-lang#131274 (library: Const-stabilize
MaybeUninit::assume_init_mut
) - rust-lang#131473 (compiler:
{TyAnd,}Layout
comes home) - rust-lang#131533 (emscripten: Use the latest emsdk 3.1.68)
- rust-lang#131593 (miri: avoid cloning AllocExtra)
- rust-lang#131616 (merge const_ipv4 / const_ipv6 feature gate into 'ip' feature gate)
- rust-lang#131660 (Also use outermost const-anon for impl items in
non_local_defs
lint)
r? @ghost
@rustbot
modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#131473 - workingjubilee:move-that-abi-up, r=saethlin
compiler: {TyAnd,}Layout
comes home
The Layout
and TyAndLayout
types are heavily abstract and have no particular target-specific qualities, though we do use them to answer questions particular to targets. We can keep it that way if we simply move them out of rustc_target
and into rustc_abi
. They bring a small entourage of connected types with them, but that's fine.
This will allow us to strengthen a few abstraction barriers over time and thus make the notoriously gnarly layout code easier to refactor. For now, we don't need to worry about that and deliberately use reexports to minimize this particular diff.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
… r=jieyouxu
Make rustc_abi
compile on stable again
rust-lang#131473 accidentally broke this
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#131997 - Veykril:veykril/push-upvqkyxmvkzw, r=jieyouxu
Make rustc_abi
compile on stable again
rust-lang#131473 accidentally broke this
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request
Labels
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the compiler team, which will review and decide on the PR/issue.