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

Remove many #[macro_use] extern crate foo items #124511

Merged
merged 10 commits into from Apr 30, 2024

Conversation

nnethercote
Copy link
Contributor

This requires the addition of more use items, which often make the code more verbose. But they also make the code easier to read, because #[macro_use] obscures where macros are defined.

r? @fee1-dead

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels Apr 29, 2024
@rustbot
Copy link
Collaborator

rustbot commented Apr 29, 2024

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

rustc_errors::translation was changed

cc @davidtwco, @compiler-errors, @TaKO8Ki

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

changes to the core type system

cc @compiler-errors, @lcnr

Some changes occurred in exhaustiveness checking

cc @Nadrieril

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras

Some changes occurred in engine.rs, potentially modifying the public API of ObligationCtxt.

cc @lcnr, @compiler-errors

This PR changes Stable MIR

cc @oli-obk, @celinval, @ouz-a

Some changes occurred in check-cfg diagnostics

cc @Urgau

These commits modify compiler targets.
(See the Target Tier Policy.)

Some changes occurred in coverage instrumentation.

cc @Zalathar

Some changes occurred in abstract_const.rs

cc @BoxyUwU

@nnethercote
Copy link
Contributor Author

Note: this doesn't remove all #[macro_use] extern crate items. There were some that would require a lot of extra use items, and I didn't have the patience to do those ones.

@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@fee1-dead fee1-dead left a comment

Choose a reason for hiding this comment

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

Well, that was 320 files to sift through. Some rambling on imports that you don't need to address, and a nit on comments. r=me afterwards.

compiler/rustc_ast_lowering/src/path.rs Outdated Show resolved Hide resolved
@fee1-dead
Copy link
Member

@bors rollup

@nnethercote
Copy link
Contributor Author

Thanks for the fast review! I have addressed the nits.

@bors r=fee1-dead

@bors
Copy link
Contributor

bors commented Apr 30, 2024

📌 Commit 2088de2 has been approved by fee1-dead

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 Apr 30, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 30, 2024
…iaskrgr

Rollup of 3 pull requests

Successful merges:

 - rust-lang#123247 (Mention Both HRTB and Generic Lifetime Param in `E0637` documentation)
 - rust-lang#124511 (Remove many `#[macro_use] extern crate foo` items)
 - rust-lang#124550 (Remove redundant union check in `KnownPanicsLint` const prop)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 784316e into rust-lang:master Apr 30, 2024
9 checks passed
@rustbot rustbot added this to the 1.80.0 milestone Apr 30, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 30, 2024
Rollup merge of rust-lang#124511 - nnethercote:rm-extern-crates, r=fee1-dead

Remove many `#[macro_use] extern crate foo` items

This requires the addition of more `use` items, which often make the code more verbose. But they also make the code easier to read, because `#[macro_use]` obscures where macros are defined.

r? `@fee1-dead`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 10, 2024
…middle, r=saethlin

Remove `#[macro_use] extern crate rustc middle` from numerous crates

Because explicit importing of macros via `use` items is nicer (more standard and readable) than implicit importing via `#[macro_use]`. This PR mops up some cases I didn't get to in rust-lang#124511.

r? `@saethlin`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 13, 2024
…ddle, r=saethlin

Remove `#[macro_use] extern crate rustc middle` from numerous crates

Because explicit importing of macros via `use` items is nicer (more standard and readable) than implicit importing via `#[macro_use]`. This PR mops up some cases I didn't get to in rust-lang#124511.

r? `@saethlin`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants