mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Remove #[macro_use] extern crate tracing
from rustc_middle
.
This commit is contained in:
parent
8ae0694fcb
commit
e9a59dbed8
@ -10,6 +10,7 @@ use rustc_hir::def_id::{DefId, DefPathHash};
|
||||
use rustc_session::StableCrateId;
|
||||
use rustc_span::def_id::{CrateNum, LocalDefId};
|
||||
use rustc_span::{ExpnHash, ExpnId, DUMMY_SP};
|
||||
use tracing::instrument;
|
||||
|
||||
macro_rules! declare_hooks {
|
||||
($($(#[$attr:meta])*hook $name:ident($($arg:ident: $K:ty),*) -> $V:ty;)*) => {
|
||||
|
@ -63,9 +63,6 @@
|
||||
#![feature(yeet_expr)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
|
@ -12,6 +12,7 @@ use rustc_session::lint::{
|
||||
use rustc_session::Session;
|
||||
use rustc_span::hygiene::{ExpnKind, MacroKind};
|
||||
use rustc_span::{symbol, DesugaringKind, Span, Symbol, DUMMY_SP};
|
||||
use tracing::instrument;
|
||||
|
||||
use crate::ty::TyCtxt;
|
||||
|
||||
|
@ -13,6 +13,7 @@ use rustc_hir as hir;
|
||||
use rustc_hir::{HirId, HirIdMap, Node};
|
||||
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use tracing::debug;
|
||||
|
||||
use std::fmt;
|
||||
use std::ops::Deref;
|
||||
|
@ -23,6 +23,7 @@ use rustc_session::Session;
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use std::num::NonZero;
|
||||
use tracing::debug;
|
||||
|
||||
#[derive(PartialEq, Clone, Copy, Debug)]
|
||||
pub enum StabilityLevel {
|
||||
|
@ -3,12 +3,12 @@
|
||||
|
||||
use std::cmp;
|
||||
|
||||
use super::{alloc_range, AllocError, AllocRange, AllocResult, CtfeProvenance, Provenance};
|
||||
use rustc_data_structures::sorted_map::SortedMap;
|
||||
use rustc_macros::HashStable;
|
||||
use rustc_target::abi::{HasDataLayout, Size};
|
||||
|
||||
use super::{alloc_range, AllocError, AllocRange, AllocResult, CtfeProvenance, Provenance};
|
||||
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
||||
use rustc_target::abi::{HasDataLayout, Size};
|
||||
use tracing::trace;
|
||||
|
||||
/// Stores the provenance information of pointers stored in memory.
|
||||
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||
|
@ -15,6 +15,7 @@ use std::num::NonZero;
|
||||
use std::sync::atomic::{AtomicU32, Ordering};
|
||||
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use tracing::{debug, trace};
|
||||
|
||||
use rustc_ast::LitKind;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
|
@ -9,6 +9,7 @@ use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_session::lint;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
impl<'tcx> TyCtxt<'tcx> {
|
||||
/// Evaluates a constant without providing any generic parameters. This is useful to evaluate consts
|
||||
|
@ -37,6 +37,7 @@ use rustc_span::symbol::Symbol;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
|
||||
use either::Either;
|
||||
use tracing::trace;
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::cell::RefCell;
|
||||
|
@ -18,6 +18,7 @@ use rustc_span::symbol::Symbol;
|
||||
use rustc_span::Span;
|
||||
use std::fmt;
|
||||
use std::hash::Hash;
|
||||
use tracing::debug;
|
||||
|
||||
/// Describes how a monomorphization will be instantiated in object files.
|
||||
#[derive(PartialEq)]
|
||||
|
@ -1,4 +1,5 @@
|
||||
use rustc_middle::mir::*;
|
||||
use tracing::debug;
|
||||
|
||||
/// This struct represents a patch to MIR, which can add
|
||||
/// new statements and basic blocks and patch over block
|
||||
|
@ -15,6 +15,7 @@ use rustc_middle::mir::interpret::{
|
||||
use rustc_middle::mir::visit::Visitor;
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_target::abi::Size;
|
||||
use tracing::trace;
|
||||
|
||||
const INDENT: &str = " ";
|
||||
/// Alignment for lining up comments following MIR statements
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
use crate::mir::*;
|
||||
use rustc_hir as hir;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
#[derive(Copy, Clone, Debug, TypeFoldable, TypeVisitable)]
|
||||
pub struct PlaceTy<'tcx> {
|
||||
|
@ -32,6 +32,7 @@ use rustc_target::asm::InlineAsmRegOrRegClass;
|
||||
use std::cmp::Ordering;
|
||||
use std::fmt;
|
||||
use std::ops::Index;
|
||||
use tracing::instrument;
|
||||
|
||||
pub mod visit;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
use crate::ty::error::TypeError;
|
||||
use crate::ty::relate::{self, Relate, RelateResult, TypeRelation};
|
||||
use crate::ty::{self, InferConst, Ty, TyCtxt};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
/// A type "A" *matches* "B" if the fresh types in B could be
|
||||
/// instantiated with values so as to make it equal to A. Matching is
|
||||
|
@ -17,6 +17,7 @@ use rustc_query_system::ich::StableHashingContext;
|
||||
use rustc_session::DataTypeKind;
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_target::abi::{ReprOptions, VariantIdx, FIRST_VARIANT};
|
||||
use tracing::{debug, info, trace};
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
@ -8,6 +8,7 @@ use rustc_hir::def::{DefKind, Res};
|
||||
use rustc_hir::def_id::LocalDefId;
|
||||
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
|
||||
use rustc_type_ir::{self as ir, TypeFlags, WithCachedTypeInfo};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
mod int;
|
||||
mod kind;
|
||||
|
@ -74,6 +74,7 @@ use rustc_target::spec::abi;
|
||||
use rustc_type_ir::TyKind::*;
|
||||
use rustc_type_ir::WithCachedTypeInfo;
|
||||
use rustc_type_ir::{CollectAndApply, Interner, TypeFlags};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::borrow::Borrow;
|
||||
|
@ -1,6 +1,7 @@
|
||||
use crate::query::Providers;
|
||||
use crate::ty::fold::{TypeFoldable, TypeFolder, TypeSuperFoldable};
|
||||
use crate::ty::{self, Ty, TyCtxt, TypeFlags, TypeVisitableExt};
|
||||
use tracing::debug;
|
||||
|
||||
pub(super) fn provide(providers: &mut Providers) {
|
||||
*providers = Providers { erase_regions_ty, ..*providers };
|
||||
|
@ -1,6 +1,7 @@
|
||||
use crate::ty::{self, Binder, BoundTy, Ty, TyCtxt, TypeVisitableExt};
|
||||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
pub use rustc_type_ir::fold::{FallibleTypeFolder, TypeFoldable, TypeFolder, TypeSuperFoldable};
|
||||
|
||||
|
@ -18,6 +18,7 @@ use rustc_macros::{
|
||||
use rustc_serialize::{Decodable, Encodable};
|
||||
use rustc_type_ir::WithCachedTypeInfo;
|
||||
use smallvec::SmallVec;
|
||||
use tracing::debug;
|
||||
|
||||
use core::intrinsics;
|
||||
use std::marker::PhantomData;
|
||||
|
@ -6,6 +6,7 @@ use rustc_hir::def_id::DefId;
|
||||
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
|
||||
use rustc_span::symbol::{kw, Symbol};
|
||||
use rustc_span::Span;
|
||||
use tracing::instrument;
|
||||
|
||||
use super::{Clause, InstantiatedPredicates, ParamConst, ParamTy, Ty, TyCtxt};
|
||||
|
||||
|
@ -12,6 +12,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHas
|
||||
use rustc_query_system::ich::StableHashingContext;
|
||||
use std::cell::RefCell;
|
||||
use std::ptr;
|
||||
use tracing::trace;
|
||||
|
||||
impl<'a, 'tcx, H, T> HashStable<StableHashingContext<'a>> for &'tcx ty::list::RawList<H, T>
|
||||
where
|
||||
|
@ -1,5 +1,6 @@
|
||||
use rustc_macros::HashStable;
|
||||
use smallvec::SmallVec;
|
||||
use tracing::instrument;
|
||||
|
||||
use crate::ty::context::TyCtxt;
|
||||
use crate::ty::{self, DefId, OpaqueTypeKey, ParamEnv, Ty};
|
||||
|
@ -48,6 +48,7 @@ use crate::ty::context::TyCtxt;
|
||||
use crate::ty::{self, DefId, Ty, TypeVisitableExt, VariantDef, Visibility};
|
||||
|
||||
use rustc_type_ir::TyKind::*;
|
||||
use tracing::instrument;
|
||||
|
||||
pub mod inhabited_predicate;
|
||||
|
||||
|
@ -14,6 +14,7 @@ use rustc_macros::{
|
||||
use rustc_middle::ty::normalize_erasing_regions::NormalizationError;
|
||||
use rustc_span::def_id::LOCAL_CRATE;
|
||||
use rustc_span::Symbol;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
use std::fmt;
|
||||
|
@ -19,6 +19,7 @@ use rustc_target::abi::*;
|
||||
use rustc_target::spec::{
|
||||
abi::Abi as SpecAbi, HasTargetSpec, HasWasmCAbiOpt, PanicStrategy, Target, WasmCAbi,
|
||||
};
|
||||
use tracing::debug;
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::cmp;
|
||||
|
@ -61,6 +61,7 @@ use rustc_span::{ExpnId, ExpnKind, Span};
|
||||
use rustc_target::abi::{Align, FieldIdx, Integer, IntegerType, VariantIdx};
|
||||
pub use rustc_target::abi::{ReprFlags, ReprOptions};
|
||||
pub use rustc_type_ir::{DebugWithInfcx, InferCtxtLike, WithInfcx};
|
||||
use tracing::{debug, instrument};
|
||||
pub use vtable::*;
|
||||
|
||||
use std::assert_matches::assert_matches;
|
||||
|
@ -11,6 +11,7 @@ use crate::traits::query::NoSolution;
|
||||
use crate::ty::fold::{FallibleTypeFolder, TypeFoldable, TypeFolder};
|
||||
use crate::ty::{self, EarlyBinder, GenericArgsRef, Ty, TyCtxt, TypeVisitableExt};
|
||||
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
#[derive(Debug, Copy, Clone, HashStable, TyEncodable, TyDecodable)]
|
||||
pub enum NormalizationError<'tcx> {
|
||||
|
@ -5,6 +5,7 @@ use crate::ty::{GenericArg, GenericArgKind};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_span::def_id::DefId;
|
||||
use rustc_span::Span;
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
/// Converts generic params of a TypeFoldable from one
|
||||
/// item's generics to another. Usually from a function's generics
|
||||
|
@ -4,6 +4,7 @@ use rustc_hir::def_id::DefId;
|
||||
use rustc_macros::{extension, HashStable};
|
||||
use rustc_type_ir as ir;
|
||||
use std::cmp::Ordering;
|
||||
use tracing::instrument;
|
||||
|
||||
use crate::ty::{
|
||||
self, DebruijnIndex, EarlyBinder, PredicatePolarity, Ty, TyCtxt, TypeFlags, Upcast, UpcastFrom,
|
||||
|
@ -7,6 +7,7 @@ use rustc_data_structures::sso::SsoHashSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::{CrateNum, DefId, LocalDefId};
|
||||
use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData};
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
// `pretty` is a separate module only for organization.
|
||||
mod pretty;
|
||||
|
@ -8,6 +8,7 @@ use rustc_span::{ErrorGuaranteed, DUMMY_SP};
|
||||
use rustc_type_ir::RegionKind as IrRegionKind;
|
||||
pub use rustc_type_ir::RegionVid;
|
||||
use std::ops::Deref;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::ty::{self, BoundVar, TyCtxt, TypeFlags};
|
||||
|
||||
|
@ -14,6 +14,7 @@ use rustc_hir::def_id::DefId;
|
||||
use rustc_macros::TypeVisitable;
|
||||
use rustc_target::spec::abi;
|
||||
use std::iter;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use super::Pattern;
|
||||
|
||||
|
@ -2,6 +2,7 @@ use crate::middle::region::{Scope, ScopeData, ScopeTree};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::ItemLocalMap;
|
||||
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
|
||||
use tracing::debug;
|
||||
|
||||
/// `RvalueScopes` is a mapping from sub-expressions to _extended_ lifetime as determined by
|
||||
/// rules laid out in `rustc_hir_analysis::check::rvalue_scopes`.
|
||||
|
@ -5,6 +5,7 @@ use hir::def_id::LOCAL_CRATE;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use std::iter;
|
||||
use tracing::debug;
|
||||
|
||||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_errors::ErrorGuaranteed;
|
||||
|
@ -24,6 +24,7 @@ use rustc_target::abi::{Float, Integer, IntegerType, Size};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use std::{fmt, iter};
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct Discr<'tcx> {
|
||||
|
@ -5,6 +5,7 @@ use crate::ty::{self, Ty};
|
||||
use crate::ty::{GenericArg, GenericArgKind};
|
||||
use rustc_data_structures::sso::SsoHashSet;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use tracing::debug;
|
||||
|
||||
// The TypeWalker's stack is hot enough that it's worth going to some effort to
|
||||
// avoid heap allocations.
|
||||
|
@ -8,6 +8,7 @@ use rustc_hir::def_id::DefId;
|
||||
use rustc_hir::{lang_items, LangItem};
|
||||
use rustc_span::symbol::Ident;
|
||||
use rustc_span::{sym, DesugaringKind, Span};
|
||||
use tracing::debug;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||
pub enum CallDesugaringKind {
|
||||
|
@ -3,6 +3,7 @@ use crate::ty::GenericArgsRef;
|
||||
use crate::ty::{self, TyCtxt};
|
||||
use rustc_span::def_id::DefId;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use tracing::debug;
|
||||
|
||||
/// Checks if the specified `local` is used as the `self` parameter of a method call
|
||||
/// in the provided `BasicBlock`. If it is, then the `DefId` of the called method is
|
||||
|
Loading…
Reference in New Issue
Block a user