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 }})

workingjubilee

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.

@rustbot

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 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

Oct 9, 2024

@rustbot

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

cc @antoyo, @GuillaumeGomez

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@rustbot rustbot added the S-blocked

Status: Blocked on something else such as an RFC or other implementation work.

label

Oct 9, 2024

@workingjubilee

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 workingjubilee removed the S-blocked

Status: Blocked on something else such as an RFC or other implementation work.

label

Oct 10, 2024

jieyouxu

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.

@saethlin

@workingjubilee

@workingjubilee

@workingjubilee

This finally unites TyAndLayout, Layout, and LayoutS into the same crate, as one might imagine they would be placed. No functional changes.

@saethlin

@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.

@bors

📌 Commit 1072190 has been approved by saethlin

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

Oct 13, 2024

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Oct 13, 2024

@matthiaskrgr

…=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.

@workingjubilee

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

Oct 14, 2024

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Oct 14, 2024

@bors

…iaskrgr

Rollup of 8 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Oct 14, 2024

@bors

…iaskrgr

Rollup of 8 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Oct 14, 2024

@bors

…iaskrgr

Rollup of 8 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Oct 14, 2024

@rust-timer

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

Oct 21, 2024

@matthiaskrgr

… 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

Oct 21, 2024

@rust-timer

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

Oct 22, 2024

@matthiaskrgr

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.