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

@ -2,6 +2,7 @@ use rustc_hir::lang_items::LangItem;
use rustc_index::Idx;
use rustc_middle::mir::patch::MirPatch;
use rustc_middle::mir::*;
use rustc_middle::span_bug;
use rustc_middle::traits::Reveal;
use rustc_middle::ty::util::IntTypeExt;
use rustc_middle::ty::GenericArgsRef;

View file

@ -13,6 +13,7 @@ use rustc_data_structures::work_queue::WorkQueue;
use rustc_graphviz as dot;
use rustc_hir::def_id::DefId;
use rustc_index::{Idx, IndexVec};
use rustc_middle::bug;
use rustc_middle::mir::{self, traversal, BasicBlock};
use rustc_middle::mir::{create_dump_file, dump_enabled};
use rustc_middle::ty::print::with_no_trimmed_paths;

View file

@ -1,5 +1,6 @@
use rustc_index::bit_set::{BitSet, ChunkedBitSet};
use rustc_index::Idx;
use rustc_middle::bug;
use rustc_middle::mir::{self, Body, CallReturnPlaces, Location, TerminatorEdges};
use rustc_middle::ty::{self, TyCtxt};

View file

@ -6,8 +6,6 @@
#[macro_use]
extern crate tracing;
#[macro_use]
extern crate rustc_middle;
use rustc_middle::ty;

View file

@ -2,6 +2,7 @@ use rustc_index::IndexVec;
use rustc_middle::mir::tcx::{PlaceTy, RvalueInitializationState};
use rustc_middle::mir::*;
use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt};
use rustc_middle::{bug, span_bug};
use smallvec::{smallvec, SmallVec};
use std::mem;

View file

@ -40,6 +40,7 @@ use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::stack::ensure_sufficient_stack;
use rustc_index::bit_set::BitSet;
use rustc_index::{IndexSlice, IndexVec};
use rustc_middle::bug;
use rustc_middle::mir::visit::{MutatingUseContext, PlaceContext, Visitor};
use rustc_middle::mir::*;
use rustc_middle::ty::{self, Ty, TyCtxt};