-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiler: {TyAnd,}Layout
comes home
#131473
Conversation
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. 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 |
967b81e
to
391c4df
Compare
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 @rustbot ready |
391c4df
to
ec04872
Compare
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.
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.
r? saethlin |
This finally unites TyAndLayout, Layout, and LayoutS into the same crate, as one might imagine they would be placed. No functional changes.
ec04872
to
1072190
Compare
@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. |
…=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 |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#128967 (std::fs::get_path freebsd update.) - rust-lang#129794 (uefi: Implement getcwd and chdir) - 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) r? `@ghost` `@rustbot` modify labels: rollup
…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
…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
…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
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.
… r=jieyouxu Make `rustc_abi` compile on stable again rust-lang#131473 accidentally broke this
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
Make `rustc_abi` compile on stable again rust-lang/rust#131473 accidentally broke this
The
Layout
andTyAndLayout
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 ofrustc_target
and intorustc_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.