Skip to content
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: Stop reexporting enum-globs from rustc_target::abi #131424

Merged
merged 9 commits into from
Oct 10, 2024

Conversation

workingjubilee
Copy link
Member

Three enums had all their variants glob-exported into a distressingly large amount of the tree. Cease to do that, and also cease to glob import the contents of the module that contained them. Redirect relevant imports to their actual source, the rustc_abi crate.

No functional changes.

@rustbot
Copy link
Collaborator

rustbot commented Oct 9, 2024

r? @chenyukang

rustbot has assigned @chenyukang.
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
Copy link
Collaborator

rustbot commented Oct 9, 2024

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

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.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I have found this very confusing in the past. You can r=me after PR CI is green.

@jieyouxu jieyouxu assigned jieyouxu and unassigned chenyukang Oct 9, 2024
@workingjubilee
Copy link
Member Author

Almost forgot one.

Copy link
Member Author

@workingjubilee workingjubilee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this, some of these types will be possible to separate out of rustc_target, but only if we stop having absolutely everything depend on this bizarre triple-nested reexport structure.

use rustc_codegen_ssa::traits::{
BaseTypeCodegenMethods, DerivedTypeCodegenMethods, LayoutTypeCodegenMethods,
};
use rustc_middle::bug;
use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
use rustc_middle::ty::print::with_no_trimmed_paths;
use rustc_middle::ty::{self, CoroutineArgsExt, Ty, TypeVisitableExt};
use rustc_target::abi::TyAbiInterface;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This...

@@ -18,8 +23,9 @@ use rustc_middle::ty::{
use rustc_session::{DataTypeKind, FieldInfo, FieldKind, SizeKind, VariantInfo};
use rustc_span::sym;
use rustc_span::symbol::Symbol;
use rustc_target::abi::*;
use rustc_target::abi::{FIRST_VARIANT, FieldIdx, Layout, VariantIdx};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...and these are the reason I bothered.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, factoring these out will also be a bit of a pain. Ah well, will worry about it later.

@workingjubilee
Copy link
Member Author

@bors r=jieyouxu rollup

@bors
Copy link
Contributor

bors commented Oct 9, 2024

📌 Commit 43e198a has been approved by jieyouxu

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 9, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Oct 9, 2024
…ob-imports, r=jieyouxu

compiler: Stop reexporting enum-globs from `rustc_target::abi`

Three enums had **all** their variants glob-exported into a distressingly large amount of the tree. Cease to do that, and also cease to glob import the contents of the module that contained them. Redirect relevant imports to their actual source, the `rustc_abi` crate.

No functional changes.
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2024
…kingjubilee

Rollup of 4 pull requests

Successful merges:

 - rust-lang#129424 (Stabilize `Pin::as_deref_mut()`)
 - rust-lang#131417 (Fix methods alignment on mobile)
 - rust-lang#131424 (compiler: Stop reexporting enum-globs from `rustc_target::abi`)
 - rust-lang#131426 (Fix quotation marks around debug line in `src/ci/run.sh`)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 9, 2024
…ob-imports, r=jieyouxu

compiler: Stop reexporting enum-globs from `rustc_target::abi`

Three enums had **all** their variants glob-exported into a distressingly large amount of the tree. Cease to do that, and also cease to glob import the contents of the module that contained them. Redirect relevant imports to their actual source, the `rustc_abi` crate.

No functional changes.
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#129424 (Stabilize `Pin::as_deref_mut()`)
 - rust-lang#131417 (Fix methods alignment on mobile)
 - rust-lang#131424 (compiler: Stop reexporting enum-globs from `rustc_target::abi`)
 - rust-lang#131426 (Fix quotation marks around debug line in `src/ci/run.sh`)
 - rust-lang#131429 (Rename directive `needs-profiler-support` to `needs-profiler-runtime`)
 - rust-lang#131435 (Ignore broken-pipe-no-ice on apple (specifically macOS) for now)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2024
…kingjubilee

Rollup of 4 pull requests

Successful merges:

 - rust-lang#129424 (Stabilize `Pin::as_deref_mut()`)
 - rust-lang#131417 (Fix methods alignment on mobile)
 - rust-lang#131424 (compiler: Stop reexporting enum-globs from `rustc_target::abi`)
 - rust-lang#131426 (Fix quotation marks around debug line in `src/ci/run.sh`)

r? `@ghost`
`@rustbot` modify labels: rollup
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Oct 9, 2024
…ob-imports, r=jieyouxu

compiler: Stop reexporting enum-globs from `rustc_target::abi`

Three enums had **all** their variants glob-exported into a distressingly large amount of the tree. Cease to do that, and also cease to glob import the contents of the module that contained them. Redirect relevant imports to their actual source, the `rustc_abi` crate.

No functional changes.
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2024
Rollup of 6 pull requests

Successful merges:

 - rust-lang#131417 (Fix methods alignment on mobile)
 - rust-lang#131420 (Dont ICE when encountering post-mono layout cycle error)
 - rust-lang#131424 (compiler: Stop reexporting enum-globs from `rustc_target::abi`)
 - rust-lang#131426 (Fix quotation marks around debug line in `src/ci/run.sh`)
 - rust-lang#131429 (Rename directive `needs-profiler-support` to `needs-profiler-runtime`)
 - rust-lang#131435 (Ignore broken-pipe-no-ice on apple (specifically macOS) for now)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#131382 (Add "reference" as a known compiletest header)
 - rust-lang#131420 (Dont ICE when encountering post-mono layout cycle error)
 - rust-lang#131424 (compiler: Stop reexporting enum-globs from `rustc_target::abi`)
 - rust-lang#131426 (Fix quotation marks around debug line in `src/ci/run.sh`)
 - rust-lang#131435 (Ignore broken-pipe-no-ice on apple (specifically macOS) for now)
 - rust-lang#131447 (add more crash tests)
 - rust-lang#131456 (Fix typo in E0793)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#131382 (Add "reference" as a known compiletest header)
 - rust-lang#131420 (Dont ICE when encountering post-mono layout cycle error)
 - rust-lang#131424 (compiler: Stop reexporting enum-globs from `rustc_target::abi`)
 - rust-lang#131426 (Fix quotation marks around debug line in `src/ci/run.sh`)
 - rust-lang#131435 (Ignore broken-pipe-no-ice on apple (specifically macOS) for now)
 - rust-lang#131447 (add more crash tests)
 - rust-lang#131456 (Fix typo in E0793)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e642442 into rust-lang:master Oct 10, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 10, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 10, 2024
Rollup merge of rust-lang#131424 - workingjubilee:stem-the-tyde-of-glob-imports, r=jieyouxu

compiler: Stop reexporting enum-globs from `rustc_target::abi`

Three enums had **all** their variants glob-exported into a distressingly large amount of the tree. Cease to do that, and also cease to glob import the contents of the module that contained them. Redirect relevant imports to their actual source, the `rustc_abi` crate.

No functional changes.
@workingjubilee workingjubilee deleted the stem-the-tyde-of-glob-imports branch October 10, 2024 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants