1
Fork 0

Rollup merge of #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`
This commit is contained in:
Matthias Krüger 2024-04-30 15:04:08 +02:00 committed by GitHub
commit 784316eadc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
320 changed files with 375 additions and 287 deletions

View file

@ -5,6 +5,7 @@ use rustc_data_structures::{
fx::FxHashMap,
stable_hasher::{HashStable, StableHasher},
};
use rustc_macros::HashStable;
use rustc_middle::{
bug,
ty::{ParamEnv, PolyExistentialTraitRef, Ty, TyCtxt},
@ -23,6 +24,8 @@ use crate::{
use super::{unknown_file_metadata, SmallVec, UNKNOWN_LINE_NUMBER};
mod private {
use rustc_macros::HashStable;
// This type cannot be constructed outside of this module because
// it has a private field. We make use of this in order to prevent
// `UniqueTypeId` from being constructed directly, without asserting

View file

@ -15,8 +15,6 @@
#![feature(let_chains)]
#![feature(impl_trait_in_assoc_type)]
#[macro_use]
extern crate rustc_macros;
#[macro_use]
extern crate tracing;