1
Fork 0

Auto merge of #125434 - nnethercote:rm-more-extern-tracing, r=jackh726

Remove more `#[macro_use] extern crate tracing`

Because explicit importing of macros via use items is nicer (more standard and readable) than implicit importing via `#[macro_use]`. Continuing the work from #124511 and #124914.

r? `@jackh726`
This commit is contained in:
bors 2024-05-23 21:36:54 +00:00
commit 8679004993
194 changed files with 193 additions and 65 deletions

View file

@ -16,6 +16,7 @@ use rustc_middle::{bug, span_bug, ty::Instance};
use rustc_span::{Pos, Span}; use rustc_span::{Pos, Span};
use rustc_target::abi::*; use rustc_target::abi::*;
use rustc_target::asm::*; use rustc_target::asm::*;
use tracing::debug;
use libc::{c_char, c_uint}; use libc::{c_char, c_uint};
use smallvec::SmallVec; use smallvec::SmallVec;

View file

@ -18,6 +18,7 @@ use rustc_codegen_ssa::back::archive::{
get_native_object_symbols, try_extract_macho_fat_archive, ArArchiveBuilder, get_native_object_symbols, try_extract_macho_fat_archive, ArArchiveBuilder,
ArchiveBuildFailure, ArchiveBuilder, ArchiveBuilderBuilder, UnknownArchiveKind, ArchiveBuildFailure, ArchiveBuilder, ArchiveBuilderBuilder, UnknownArchiveKind,
}; };
use tracing::trace;
use rustc_session::cstore::DllImport; use rustc_session::cstore::DllImport;
use rustc_session::Session; use rustc_session::Session;

View file

@ -20,6 +20,7 @@ use rustc_middle::bug;
use rustc_middle::dep_graph::WorkProduct; use rustc_middle::dep_graph::WorkProduct;
use rustc_middle::middle::exported_symbols::{SymbolExportInfo, SymbolExportLevel}; use rustc_middle::middle::exported_symbols::{SymbolExportInfo, SymbolExportLevel};
use rustc_session::config::{self, CrateType, Lto}; use rustc_session::config::{self, CrateType, Lto};
use tracing::{debug, info};
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::ffi::{CStr, CString}; use std::ffi::{CStr, CString};

View file

@ -35,6 +35,7 @@ use rustc_session::Session;
use rustc_span::symbol::sym; use rustc_span::symbol::sym;
use rustc_span::InnerSpan; use rustc_span::InnerSpan;
use rustc_target::spec::{CodeModel, RelocModel, SanitizerSet, SplitDebuginfo, TlsModel}; use rustc_target::spec::{CodeModel, RelocModel, SanitizerSet, SplitDebuginfo, TlsModel};
use tracing::debug;
use crate::llvm::diagnostic::OptimizationDiagnosticKind; use crate::llvm::diagnostic::OptimizationDiagnosticKind;
use libc::{c_char, c_int, c_void, size_t}; use libc::{c_char, c_int, c_void, size_t};

View file

@ -30,6 +30,7 @@ use std::borrow::Cow;
use std::iter; use std::iter;
use std::ops::Deref; use std::ops::Deref;
use std::ptr; use std::ptr;
use tracing::{debug, instrument};
// All Builders must have an llfn associated with them // All Builders must have an llfn associated with them
#[must_use] #[must_use]

View file

@ -12,6 +12,7 @@ use crate::value::Value;
use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt}; use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt};
use rustc_middle::ty::{self, Instance, TypeVisitableExt}; use rustc_middle::ty::{self, Instance, TypeVisitableExt};
use tracing::debug;
/// Codegens a reference to a fn/method item, monomorphizing and /// Codegens a reference to a fn/method item, monomorphizing and
/// inlining as it goes. /// inlining as it goes.

View file

@ -19,6 +19,7 @@ use rustc_target::spec::Target;
use libc::{c_char, c_uint}; use libc::{c_char, c_uint};
use std::fmt::Write; use std::fmt::Write;
use tracing::debug;
/* /*
* A note on nomenclature of linking: "extern", "foreign", and "upcall". * A note on nomenclature of linking: "extern", "foreign", and "upcall".

View file

@ -25,6 +25,7 @@ use rustc_target::abi::{
Align, AlignFromBytesError, HasDataLayout, Primitive, Scalar, Size, WrappingRange, Align, AlignFromBytesError, HasDataLayout, Primitive, Scalar, Size, WrappingRange,
}; };
use std::ops::Range; use std::ops::Range;
use tracing::{debug, instrument, trace};
pub fn const_alloc_to_llvm<'ll>( pub fn const_alloc_to_llvm<'ll>(
cx: &CodegenCx<'ll, '_>, cx: &CodegenCx<'ll, '_>,

View file

@ -9,6 +9,7 @@ use rustc_middle::mir::coverage::{
}; };
use rustc_middle::ty::Instance; use rustc_middle::ty::Instance;
use rustc_span::Symbol; use rustc_span::Symbol;
use tracing::{debug, instrument};
/// Holds all of the coverage mapping data associated with a function instance, /// Holds all of the coverage mapping data associated with a function instance,
/// collected during traversal of `Coverage` statements in the function's MIR. /// collected during traversal of `Coverage` statements in the function's MIR.

View file

@ -14,6 +14,7 @@ use rustc_middle::mir;
use rustc_middle::ty::{self, TyCtxt}; use rustc_middle::ty::{self, TyCtxt};
use rustc_span::def_id::DefIdSet; use rustc_span::def_id::DefIdSet;
use rustc_span::Symbol; use rustc_span::Symbol;
use tracing::debug;
/// Generates and exports the Coverage Map. /// Generates and exports the Coverage Map.
/// ///

View file

@ -17,6 +17,7 @@ use rustc_middle::mir::coverage::CoverageKind;
use rustc_middle::ty::layout::HasTyCtxt; use rustc_middle::ty::layout::HasTyCtxt;
use rustc_middle::ty::Instance; use rustc_middle::ty::Instance;
use rustc_target::abi::{Align, Size}; use rustc_target::abi::{Align, Size};
use tracing::{debug, instrument};
use std::cell::RefCell; use std::cell::RefCell;

View file

@ -41,6 +41,7 @@ use rustc_symbol_mangling::typeid_for_trait_ref;
use rustc_target::abi::{Align, Size}; use rustc_target::abi::{Align, Size};
use rustc_target::spec::DebuginfoKind; use rustc_target::spec::DebuginfoKind;
use smallvec::smallvec; use smallvec::smallvec;
use tracing::{debug, instrument};
use libc::{c_char, c_longlong, c_uint}; use libc::{c_char, c_longlong, c_uint};
use std::borrow::Cow; use std::borrow::Cow;

View file

@ -42,6 +42,7 @@ use std::cell::OnceCell;
use std::cell::RefCell; use std::cell::RefCell;
use std::iter; use std::iter;
use std::ops::Range; use std::ops::Range;
use tracing::debug;
mod create_scope_map; mod create_scope_map;
pub mod gdb; pub mod gdb;

View file

@ -6,7 +6,7 @@ use super::CodegenUnitDebugContext;
use rustc_hir::def_id::DefId; use rustc_hir::def_id::DefId;
use rustc_middle::ty::layout::{HasParamEnv, LayoutOf}; use rustc_middle::ty::layout::{HasParamEnv, LayoutOf};
use rustc_middle::ty::{self, Ty}; use rustc_middle::ty::{self, Ty};
use trace; use tracing::trace;
use crate::common::CodegenCx; use crate::common::CodegenCx;
use crate::llvm; use crate::llvm;

View file

@ -24,6 +24,7 @@ use rustc_data_structures::fx::FxIndexSet;
use rustc_middle::ty::{Instance, Ty}; use rustc_middle::ty::{Instance, Ty};
use rustc_sanitizers::{cfi, kcfi}; use rustc_sanitizers::{cfi, kcfi};
use smallvec::SmallVec; use smallvec::SmallVec;
use tracing::debug;
/// Declare a function. /// Declare a function.
/// ///

View file

@ -21,6 +21,7 @@ use rustc_middle::{bug, span_bug};
use rustc_span::{sym, Span, Symbol}; use rustc_span::{sym, Span, Symbol};
use rustc_target::abi::{self, Align, Float, HasDataLayout, Primitive, Size}; use rustc_target::abi::{self, Align, Float, HasDataLayout, Primitive, Size};
use rustc_target::spec::{HasTargetSpec, PanicStrategy}; use rustc_target::spec::{HasTargetSpec, PanicStrategy};
use tracing::debug;
use std::cmp::Ordering; use std::cmp::Ordering;

View file

@ -15,9 +15,6 @@
#![feature(let_chains)] #![feature(let_chains)]
#![feature(impl_trait_in_assoc_type)] #![feature(impl_trait_in_assoc_type)]
#[macro_use]
extern crate tracing;
use back::owned_target_machine::OwnedTargetMachine; use back::owned_target_machine::OwnedTargetMachine;
use back::write::{create_informational_target_machine, create_target_machine}; use back::write::{create_informational_target_machine, create_target_machine};

View file

@ -13,6 +13,7 @@ use rustc_middle::ty::layout::{FnAbiOf, LayoutOf};
use rustc_middle::ty::{self, Instance, TypeVisitableExt}; use rustc_middle::ty::{self, Instance, TypeVisitableExt};
use rustc_session::config::CrateType; use rustc_session::config::CrateType;
use rustc_target::spec::RelocModel; use rustc_target::spec::RelocModel;
use tracing::debug;
impl<'tcx> PreDefineMethods<'tcx> for CodegenCx<'_, 'tcx> { impl<'tcx> PreDefineMethods<'tcx> for CodegenCx<'_, 'tcx> {
fn predefine_static( fn predefine_static(

View file

@ -8,6 +8,7 @@ use rustc_middle::ty::{self, Ty, TypeVisitableExt};
use rustc_target::abi::{Abi, Align, FieldsShape}; use rustc_target::abi::{Abi, Align, FieldsShape};
use rustc_target::abi::{Float, Int, Pointer}; use rustc_target::abi::{Float, Int, Pointer};
use rustc_target::abi::{Scalar, Size, Variants}; use rustc_target::abi::{Scalar, Size, Variants};
use tracing::debug;
use std::fmt::Write; use std::fmt::Write;

View file

@ -37,6 +37,7 @@ use rustc_span::{Span, Symbol};
use std::borrow::Cow; use std::borrow::Cow;
use std::fmt; use std::fmt;
use thin_vec::ThinVec; use thin_vec::ThinVec;
use tracing::debug;
#[allow(missing_docs)] #[allow(missing_docs)]
pub fn assert_module_sources(tcx: TyCtxt<'_>, set_reuse: &dyn Fn(&mut CguReuseTracker)) { pub fn assert_module_sources(tcx: TyCtxt<'_>, set_reuse: &dyn Fn(&mut CguReuseTracker)) {

View file

@ -52,6 +52,7 @@ use std::ops::Deref;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::process::{ExitStatus, Output, Stdio}; use std::process::{ExitStatus, Output, Stdio};
use std::{env, fmt, fs, io, mem, str}; use std::{env, fmt, fs, io, mem, str};
use tracing::{debug, info, warn};
pub fn ensure_removed(dcx: &DiagCtxt, path: &Path) { pub fn ensure_removed(dcx: &DiagCtxt, path: &Path) {
if let Err(e) = fs::remove_file(path) { if let Err(e) = fs::remove_file(path) {

View file

@ -22,6 +22,7 @@ use rustc_session::Session;
use rustc_target::spec::{Cc, LinkOutputKind, LinkerFlavor, Lld}; use rustc_target::spec::{Cc, LinkOutputKind, LinkerFlavor, Lld};
use cc::windows_registry; use cc::windows_registry;
use tracing::{debug, warn};
/// Disables non-English messages from localized linkers. /// Disables non-English messages from localized linkers.
/// Such messages may cause issues with text encoding on Windows (#35785) /// Such messages may cause issues with text encoding on Windows (#35785)

View file

@ -3,6 +3,7 @@ use rustc_data_structures::fx::FxHashSet;
use rustc_fs_util::try_canonicalize; use rustc_fs_util::try_canonicalize;
use std::ffi::OsString; use std::ffi::OsString;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use tracing::debug;
pub struct RPathConfig<'a> { pub struct RPathConfig<'a> {
pub libs: &'a [&'a Path], pub libs: &'a [&'a Path],

View file

@ -18,6 +18,7 @@ use rustc_middle::ty::{GenericArgKind, GenericArgsRef};
use rustc_middle::util::Providers; use rustc_middle::util::Providers;
use rustc_session::config::{CrateType, OomStrategy}; use rustc_session::config::{CrateType, OomStrategy};
use rustc_target::spec::{SanitizerSet, TlsModel}; use rustc_target::spec::{SanitizerSet, TlsModel};
use tracing::debug;
pub fn threshold(tcx: TyCtxt<'_>) -> SymbolExportLevel { pub fn threshold(tcx: TyCtxt<'_>) -> SymbolExportLevel {
crates_export_threshold(tcx.crate_types()) crates_export_threshold(tcx.crate_types())

View file

@ -49,6 +49,7 @@ use std::str;
use std::sync::mpsc::{channel, Receiver, Sender}; use std::sync::mpsc::{channel, Receiver, Sender};
use std::sync::Arc; use std::sync::Arc;
use std::thread; use std::thread;
use tracing::debug;
const PRE_LTO_BC_EXT: &str = "pre-lto.bc"; const PRE_LTO_BC_EXT: &str = "pre-lto.bc";

View file

@ -45,6 +45,7 @@ use std::collections::BTreeSet;
use std::time::{Duration, Instant}; use std::time::{Duration, Instant};
use itertools::Itertools; use itertools::Itertools;
use tracing::{debug, info};
pub fn bin_op_to_icmp_predicate(op: BinOp, signed: bool) -> IntPredicate { pub fn bin_op_to_icmp_predicate(op: BinOp, signed: bool) -> IntPredicate {
match op { match op {

View file

@ -15,9 +15,6 @@
//! The backend-agnostic functions of this crate use functions defined in various traits that //! The backend-agnostic functions of this crate use functions defined in various traits that
//! have to be implemented by each backend. //! have to be implemented by each backend.
#[macro_use]
extern crate tracing;
use rustc_ast as ast; use rustc_ast as ast;
use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::fx::FxIndexMap; use rustc_data_structures::fx::FxIndexMap;

View file

@ -5,6 +5,7 @@ use rustc_middle::ty::{self, GenericArgKind, Ty};
use rustc_session::config::Lto; use rustc_session::config::Lto;
use rustc_symbol_mangling::typeid_for_trait_ref; use rustc_symbol_mangling::typeid_for_trait_ref;
use rustc_target::abi::call::FnAbi; use rustc_target::abi::call::FnAbi;
use tracing::{debug, instrument};
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
pub struct VirtualIndex(u64); pub struct VirtualIndex(u64);

View file

@ -11,6 +11,7 @@ use rustc_middle::mir::visit::{MutatingUseContext, NonMutatingUseContext, PlaceC
use rustc_middle::mir::{self, DefLocation, Location, TerminatorKind}; use rustc_middle::mir::{self, DefLocation, Location, TerminatorKind};
use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf}; use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf};
use rustc_middle::{bug, span_bug}; use rustc_middle::{bug, span_bug};
use tracing::debug;
pub fn non_ssa_locals<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( pub fn non_ssa_locals<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
fx: &FunctionCx<'a, 'tcx, Bx>, fx: &FunctionCx<'a, 'tcx, Bx>,

View file

@ -24,6 +24,7 @@ use rustc_span::{source_map::Spanned, sym, Span};
use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode, Reg}; use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode, Reg};
use rustc_target::abi::{self, HasDataLayout, WrappingRange}; use rustc_target::abi::{self, HasDataLayout, WrappingRange};
use rustc_target::spec::abi::Abi; use rustc_target::spec::abi::Abi;
use tracing::{debug, info};
use std::cmp; use std::cmp;

View file

@ -7,6 +7,8 @@ use rustc_index::IndexVec;
use rustc_middle::mir; use rustc_middle::mir;
use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::print::with_no_trimmed_paths;
use std::ops::{Index, IndexMut}; use std::ops::{Index, IndexMut};
use tracing::{debug, warn};
pub(super) struct Locals<'tcx, V> { pub(super) struct Locals<'tcx, V> {
values: IndexVec<mir::Local, LocalRef<'tcx, V>>, values: IndexVec<mir::Local, LocalRef<'tcx, V>>,
} }

View file

@ -10,6 +10,7 @@ use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt, TyAndLayout};
use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypeFoldable, TypeVisitableExt}; use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypeFoldable, TypeVisitableExt};
use rustc_middle::{bug, span_bug}; use rustc_middle::{bug, span_bug};
use rustc_target::abi::call::{FnAbi, PassMode}; use rustc_target::abi::call::{FnAbi, PassMode};
use tracing::{debug, instrument};
use std::iter; use std::iter;

View file

@ -16,6 +16,7 @@ use std::fmt;
use arrayvec::ArrayVec; use arrayvec::ArrayVec;
use either::Either; use either::Either;
use tracing::debug;
/// The representation of a Rust value. The enum variant is in fact /// The representation of a Rust value. The enum variant is in fact
/// uniquely determined by the value's type, but is kept as a /// uniquely determined by the value's type, but is kept as a

View file

@ -12,6 +12,7 @@ use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf, TyAndLayout};
use rustc_middle::ty::{self, Ty}; use rustc_middle::ty::{self, Ty};
use rustc_target::abi::{Align, FieldsShape, Int, Pointer, Size, TagEncoding}; use rustc_target::abi::{Align, FieldsShape, Int, Pointer, Size, TagEncoding};
use rustc_target::abi::{VariantIdx, Variants}; use rustc_target::abi::{VariantIdx, Variants};
use tracing::{debug, instrument};
/// The location and extra runtime properties of the place. /// The location and extra runtime properties of the place.
/// ///
@ -159,9 +160,9 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
bx.inbounds_ptradd(self.val.llval, bx.const_usize(offset.bytes())) bx.inbounds_ptradd(self.val.llval, bx.const_usize(offset.bytes()))
}; };
let val = PlaceValue { let val = PlaceValue {
llval, llval,
llextra: if bx.cx().type_has_metadata(field.ty) { self.val.llextra } else { None }, llextra: if bx.cx().type_has_metadata(field.ty) { self.val.llextra } else { None },
align: effective_field_align, align: effective_field_align,
}; };
val.with_type(field) val.with_type(field)
}; };
@ -408,9 +409,9 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
}; };
let llval = bx.inbounds_gep( let llval = bx.inbounds_gep(
bx.cx().backend_type(self.layout), bx.cx().backend_type(self.layout),
self.val.llval, self.val.llval,
&[bx.cx().const_usize(0), llindex], &[bx.cx().const_usize(0), llindex],
); );
let align = self.val.align.restrict_for_offset(offset); let align = self.val.align.restrict_for_offset(offset);
PlaceValue::new_sized(llval, align).with_type(layout) PlaceValue::new_sized(llval, align).with_type(layout)

View file

@ -17,6 +17,7 @@ use rustc_span::{Span, DUMMY_SP};
use rustc_target::abi::{self, FieldIdx, FIRST_VARIANT}; use rustc_target::abi::{self, FieldIdx, FIRST_VARIANT};
use arrayvec::ArrayVec; use arrayvec::ArrayVec;
use tracing::{debug, instrument};
impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
#[instrument(level = "trace", skip(self, bx))] #[instrument(level = "trace", skip(self, bx))]

View file

@ -1,6 +1,7 @@
use rustc_middle::mir::{self, NonDivergingIntrinsic}; use rustc_middle::mir::{self, NonDivergingIntrinsic};
use rustc_middle::span_bug; use rustc_middle::span_bug;
use rustc_session::config::OptLevel; use rustc_session::config::OptLevel;
use tracing::instrument;
use super::FunctionCx; use super::FunctionCx;
use super::LocalRef; use super::LocalRef;

View file

@ -9,6 +9,7 @@ use rustc_middle::span_bug;
use rustc_middle::ty; use rustc_middle::ty;
use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf}; use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf};
use rustc_middle::ty::Instance; use rustc_middle::ty::Instance;
use tracing::debug;
pub trait MonoItemExt<'a, 'tcx> { pub trait MonoItemExt<'a, 'tcx> {
fn define<Bx: BuilderMethods<'a, 'tcx>>(&self, cx: &'a Bx::CodegenCx); fn define<Bx: BuilderMethods<'a, 'tcx>>(&self, cx: &'a Bx::CodegenCx);

View file

@ -9,6 +9,7 @@ use rustc_middle::bug;
use rustc_middle::ty::print::{with_no_trimmed_paths, with_no_visible_paths}; use rustc_middle::ty::print::{with_no_trimmed_paths, with_no_visible_paths};
use rustc_middle::ty::{self, Ty}; use rustc_middle::ty::{self, Ty};
use rustc_target::abi::WrappingRange; use rustc_target::abi::WrappingRange;
use tracing::{debug, trace};
pub fn size_and_align_of_dst<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( pub fn size_and_align_of_dst<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
bx: &mut Bx, bx: &mut Bx,

View file

@ -1,6 +1,7 @@
use std::sync::atomic::Ordering::Relaxed; use std::sync::atomic::Ordering::Relaxed;
use either::{Left, Right}; use either::{Left, Right};
use tracing::{debug, instrument, trace};
use rustc_hir::def::DefKind; use rustc_hir::def::DefKind;
use rustc_middle::bug; use rustc_middle::bug;

View file

@ -21,6 +21,7 @@ use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span; use rustc_span::Span;
use rustc_target::abi::{Align, Size}; use rustc_target::abi::{Align, Size};
use rustc_target::spec::abi::Abi as CallAbi; use rustc_target::spec::abi::Abi as CallAbi;
use tracing::debug;
use crate::errors::{LongRunning, LongRunningWarn}; use crate::errors::{LongRunning, LongRunningWarn};
use crate::fluent_generated as fluent; use crate::fluent_generated as fluent;

View file

@ -6,6 +6,7 @@ use rustc_middle::mir::interpret::InterpErrorInfo;
use rustc_middle::query::{Key, TyCtxtAt}; use rustc_middle::query::{Key, TyCtxtAt};
use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_middle::ty::{self, Ty, TyCtxt};
use rustc_target::abi::VariantIdx; use rustc_target::abi::VariantIdx;
use tracing::instrument;
use crate::interpret::{format_interp_error, InterpCx}; use crate::interpret::{format_interp_error, InterpCx};

View file

@ -6,6 +6,7 @@ use rustc_middle::ty::layout::{LayoutCx, LayoutOf, TyAndLayout};
use rustc_middle::ty::{self, ScalarInt, Ty, TyCtxt}; use rustc_middle::ty::{self, ScalarInt, Ty, TyCtxt};
use rustc_span::DUMMY_SP; use rustc_span::DUMMY_SP;
use rustc_target::abi::{Abi, VariantIdx}; use rustc_target::abi::{Abi, VariantIdx};
use tracing::{debug, instrument, trace};
use super::eval_queries::{mk_eval_cx_to_read_const_val, op_to_const}; use super::eval_queries::{mk_eval_cx_to_read_const_val, op_to_const};
use super::machine::CompileTimeEvalContext; use super::machine::CompileTimeEvalContext;

View file

@ -10,6 +10,7 @@ use rustc_middle::ty::{self, FloatTy, Ty};
use rustc_middle::{bug, span_bug}; use rustc_middle::{bug, span_bug};
use rustc_target::abi::Integer; use rustc_target::abi::Integer;
use rustc_type_ir::TyKind::*; use rustc_type_ir::TyKind::*;
use tracing::trace;
use super::{ use super::{
err_inval, throw_ub, throw_ub_custom, util::ensure_monomorphic_enough, FnVal, ImmTy, Immediate, err_inval, throw_ub, throw_ub_custom, util::ensure_monomorphic_enough, FnVal, ImmTy, Immediate,

View file

@ -6,6 +6,7 @@ use rustc_middle::ty::layout::{LayoutOf, PrimitiveExt};
use rustc_middle::ty::{self, ScalarInt, Ty}; use rustc_middle::ty::{self, ScalarInt, Ty};
use rustc_target::abi::{self, TagEncoding}; use rustc_target::abi::{self, TagEncoding};
use rustc_target::abi::{VariantIdx, Variants}; use rustc_target::abi::{VariantIdx, Variants};
use tracing::{instrument, trace};
use super::{ use super::{
err_ub, throw_ub, ImmTy, InterpCx, InterpResult, Machine, Readable, Scalar, Writeable, err_ub, throw_ub, ImmTy, InterpCx, InterpResult, Machine, Readable, Scalar, Writeable,

View file

@ -2,6 +2,7 @@ use std::cell::Cell;
use std::{fmt, mem}; use std::{fmt, mem};
use either::{Either, Left, Right}; use either::{Either, Left, Right};
use tracing::{debug, info, info_span, instrument, trace};
use hir::CRATE_HIR_ID; use hir::CRATE_HIR_ID;
use rustc_errors::DiagCtxt; use rustc_errors::DiagCtxt;

View file

@ -23,6 +23,7 @@ use rustc_middle::query::TyCtxtAt;
use rustc_middle::ty::layout::TyAndLayout; use rustc_middle::ty::layout::TyAndLayout;
use rustc_span::def_id::LocalDefId; use rustc_span::def_id::LocalDefId;
use rustc_span::sym; use rustc_span::sym;
use tracing::{instrument, trace};
use super::{err_ub, AllocId, Allocation, InterpCx, MPlaceTy, Machine, MemoryKind, PlaceTy}; use super::{err_ub, AllocId, Allocation, InterpCx, MPlaceTy, Machine, MemoryKind, PlaceTy};
use crate::const_eval; use crate::const_eval;

View file

@ -14,6 +14,7 @@ use rustc_middle::{
}; };
use rustc_span::symbol::{sym, Symbol}; use rustc_span::symbol::{sym, Symbol};
use rustc_target::abi::Size; use rustc_target::abi::Size;
use tracing::trace;
use super::{ use super::{
err_inval, err_ub_custom, err_unsup_format, memory::MemoryKind, throw_inval, throw_ub_custom, err_inval, err_ub_custom, err_unsup_format, memory::MemoryKind, throw_inval, throw_ub_custom,

View file

@ -21,6 +21,8 @@ use rustc_middle::mir::display_allocation;
use rustc_middle::ty::{self, Instance, ParamEnv, Ty, TyCtxt}; use rustc_middle::ty::{self, Instance, ParamEnv, Ty, TyCtxt};
use rustc_target::abi::{Align, HasDataLayout, Size}; use rustc_target::abi::{Align, HasDataLayout, Size};
use tracing::{debug, instrument, trace};
use crate::fluent_generated as fluent; use crate::fluent_generated as fluent;
use super::{ use super::{

View file

@ -4,6 +4,7 @@
use std::assert_matches::assert_matches; use std::assert_matches::assert_matches;
use either::{Either, Left, Right}; use either::{Either, Left, Right};
use tracing::trace;
use rustc_hir::def::Namespace; use rustc_hir::def::Namespace;
use rustc_middle::mir::interpret::ScalarSizeMismatch; use rustc_middle::mir::interpret::ScalarSizeMismatch;

View file

@ -7,6 +7,7 @@ use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
use rustc_middle::ty::{self, FloatTy, ScalarInt}; use rustc_middle::ty::{self, FloatTy, ScalarInt};
use rustc_middle::{bug, span_bug}; use rustc_middle::{bug, span_bug};
use rustc_span::symbol::sym; use rustc_span::symbol::sym;
use tracing::trace;
use super::{err_ub, throw_ub, ImmTy, InterpCx, Machine}; use super::{err_ub, throw_ub, ImmTy, InterpCx, Machine};

View file

@ -5,6 +5,7 @@
use std::assert_matches::assert_matches; use std::assert_matches::assert_matches;
use either::{Either, Left, Right}; use either::{Either, Left, Right};
use tracing::{instrument, trace};
use rustc_ast::Mutability; use rustc_ast::Mutability;
use rustc_middle::mir; use rustc_middle::mir;

View file

@ -18,6 +18,8 @@ use rustc_middle::{bug, span_bug};
use rustc_target::abi::Size; use rustc_target::abi::Size;
use rustc_target::abi::{self, VariantIdx}; use rustc_target::abi::{self, VariantIdx};
use tracing::{debug, instrument};
use super::{ use super::{
throw_ub, throw_unsup_format, InterpCx, InterpResult, MPlaceTy, Machine, MemPlaceMeta, OpTy, throw_ub, throw_unsup_format, InterpCx, InterpResult, MPlaceTy, Machine, MemPlaceMeta, OpTy,
Provenance, Scalar, Provenance, Scalar,

View file

@ -3,6 +3,7 @@
//! The main entry point is the `step` method. //! The main entry point is the `step` method.
use either::Either; use either::Either;
use tracing::{info, instrument, trace};
use rustc_index::IndexSlice; use rustc_index::IndexSlice;
use rustc_middle::mir; use rustc_middle::mir;

View file

@ -1,6 +1,7 @@
use std::borrow::Cow; use std::borrow::Cow;
use either::Either; use either::Either;
use tracing::trace;
use rustc_middle::span_bug; use rustc_middle::span_bug;
use rustc_middle::{ use rustc_middle::{

View file

@ -2,6 +2,7 @@ use rustc_middle::mir::interpret::{InterpResult, Pointer};
use rustc_middle::ty::layout::LayoutOf; use rustc_middle::ty::layout::LayoutOf;
use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_middle::ty::{self, Ty, TyCtxt};
use rustc_target::abi::{Align, Size}; use rustc_target::abi::{Align, Size};
use tracing::trace;
use super::util::ensure_monomorphic_enough; use super::util::ensure_monomorphic_enough;
use super::{InterpCx, Machine}; use super::{InterpCx, Machine};

View file

@ -7,6 +7,7 @@ use rustc_middle::ty::{
self, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor, self, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor,
}; };
use std::ops::ControlFlow; use std::ops::ControlFlow;
use tracing::debug;
use super::{throw_inval, InterpCx, MPlaceTy, MemPlaceMeta, MemoryKind}; use super::{throw_inval, InterpCx, MPlaceTy, MemPlaceMeta, MemoryKind};

View file

@ -8,6 +8,7 @@ use std::fmt::Write;
use std::num::NonZero; use std::num::NonZero;
use either::{Left, Right}; use either::{Left, Right};
use tracing::trace;
use hir::def::DefKind; use hir::def::DefKind;
use rustc_ast::Mutability; use rustc_ast::Mutability;

View file

@ -6,6 +6,7 @@ use rustc_middle::mir::interpret::InterpResult;
use rustc_middle::ty::{self, Ty}; use rustc_middle::ty::{self, Ty};
use rustc_target::abi::FieldIdx; use rustc_target::abi::FieldIdx;
use rustc_target::abi::{FieldsShape, VariantIdx, Variants}; use rustc_target::abi::{FieldsShape, VariantIdx, Variants};
use tracing::trace;
use std::num::NonZero; use std::num::NonZero;

View file

@ -14,9 +14,6 @@
#![feature(yeet_expr)] #![feature(yeet_expr)]
#![feature(if_let_guard)] #![feature(if_let_guard)]
#[macro_use]
extern crate tracing;
pub mod const_eval; pub mod const_eval;
mod errors; mod errors;
pub mod interpret; pub mod interpret;

View file

@ -20,6 +20,8 @@ use rustc_type_ir::visit::{TypeSuperVisitable, TypeVisitor};
use std::mem; use std::mem;
use std::ops::Deref; use std::ops::Deref;
use tracing::{debug, instrument, trace};
use super::ops::{self, NonConstOp, Status}; use super::ops::{self, NonConstOp, Status};
use super::qualifs::{self, HasMutInterior, NeedsDrop, NeedsNonConstDrop}; use super::qualifs::{self, HasMutInterior, NeedsDrop, NeedsNonConstDrop};
use super::resolver::FlowSensitiveAnalysis; use super::resolver::FlowSensitiveAnalysis;

View file

@ -19,6 +19,7 @@ use rustc_session::parse::feature_err;
use rustc_span::symbol::sym; use rustc_span::symbol::sym;
use rustc_span::{BytePos, Pos, Span, Symbol}; use rustc_span::{BytePos, Pos, Span, Symbol};
use rustc_trait_selection::traits::SelectionContext; use rustc_trait_selection::traits::SelectionContext;
use tracing::debug;
use super::ConstCx; use super::ConstCx;
use crate::errors; use crate::errors;

View file

@ -2,6 +2,7 @@ use rustc_middle::mir::visit::Visitor;
use rustc_middle::mir::{self, BasicBlock, Location}; use rustc_middle::mir::{self, BasicBlock, Location};
use rustc_middle::ty::{Ty, TyCtxt}; use rustc_middle::ty::{Ty, TyCtxt};
use rustc_span::{symbol::sym, Span}; use rustc_span::{symbol::sym, Span};
use tracing::trace;
use super::check::Qualifs; use super::check::Qualifs;
use super::ops::{self, NonConstOp}; use super::ops::{self, NonConstOp};

View file

@ -13,6 +13,7 @@ use rustc_middle::ty::{self, AdtDef, GenericArgsRef, Ty};
use rustc_trait_selection::traits::{ use rustc_trait_selection::traits::{
ImplSource, Obligation, ObligationCause, ObligationCtxt, SelectionContext, ImplSource, Obligation, ObligationCause, ObligationCtxt, SelectionContext,
}; };
use tracing::{instrument, trace};
use super::ConstCx; use super::ConstCx;

View file

@ -1,6 +1,7 @@
use rustc_middle::mir::*; use rustc_middle::mir::*;
use rustc_middle::ty::{self, TyCtxt}; use rustc_middle::ty::{self, TyCtxt};
use rustc_target::abi::Align; use rustc_target::abi::Align;
use tracing::debug;
/// Returns `true` if this place is allowed to be less aligned /// Returns `true` if this place is allowed to be less aligned
/// than its containing struct (because it is within a packed /// than its containing struct (because it is within a packed

View file

@ -5,6 +5,7 @@ use rustc_middle::query::TyCtxtAt;
use rustc_middle::ty::layout::LayoutOf; use rustc_middle::ty::layout::LayoutOf;
use rustc_middle::ty::{self, Mutability}; use rustc_middle::ty::{self, Mutability};
use rustc_span::symbol::Symbol; use rustc_span::symbol::Symbol;
use tracing::trace;
use crate::const_eval::{mk_eval_cx_to_read_const_val, CanAccessMutGlobal, CompileTimeEvalContext}; use crate::const_eval::{mk_eval_cx_to_read_const_val, CanAccessMutGlobal, CompileTimeEvalContext};
use crate::interpret::*; use crate::interpret::*;

View file

@ -5,9 +5,6 @@
#![feature(type_alias_impl_trait)] #![feature(type_alias_impl_trait)]
#![allow(internal_features)] #![allow(internal_features)]
#[macro_use]
extern crate tracing;
use fluent_bundle::FluentResource; use fluent_bundle::FluentResource;
use fluent_syntax::parser::ParserError; use fluent_syntax::parser::ParserError;
use icu_provider_adapters::fallback::{LocaleFallbackProvider, LocaleFallbacker}; use icu_provider_adapters::fallback::{LocaleFallbackProvider, LocaleFallbacker};
@ -20,6 +17,7 @@ use std::fmt;
use std::fs; use std::fs;
use std::io; use std::io;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use tracing::{instrument, trace};
#[cfg(not(parallel_compiler))] #[cfg(not(parallel_compiler))]
use std::cell::LazyCell as Lazy; use std::cell::LazyCell as Lazy;

View file

@ -49,10 +49,10 @@ use rustc_middle::ty::TyCtxt;
use rustc_middle::{bug, span_bug}; use rustc_middle::{bug, span_bug};
use rustc_span::symbol::{sym, Symbol}; use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span; use rustc_span::Span;
use std::env; use std::env;
use std::fs::{self, File}; use std::fs::{self, File};
use std::io::{BufWriter, Write}; use std::io::{BufWriter, Write};
use tracing::debug;
#[allow(missing_docs)] #[allow(missing_docs)]
pub fn assert_dep_graph(tcx: TyCtxt<'_>) { pub fn assert_dep_graph(tcx: TyCtxt<'_>) {

View file

@ -6,9 +6,6 @@
#![feature(rustdoc_internals)] #![feature(rustdoc_internals)]
#![allow(internal_features)] #![allow(internal_features)]
#[macro_use]
extern crate tracing;
mod assert_dep_graph; mod assert_dep_graph;
mod errors; mod errors;
mod persist; mod persist;

View file

@ -33,6 +33,7 @@ use rustc_middle::ty::TyCtxt;
use rustc_span::symbol::{sym, Symbol}; use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span; use rustc_span::Span;
use thin_vec::ThinVec; use thin_vec::ThinVec;
use tracing::debug;
const LOADED_FROM_DISK: Symbol = sym::loaded_from_disk; const LOADED_FROM_DISK: Symbol = sym::loaded_from_disk;
const EXCEPT: Symbol = sym::except; const EXCEPT: Symbol = sym::except;

View file

@ -19,6 +19,7 @@ use std::env;
use std::fs; use std::fs;
use std::io::{self, Read}; use std::io::{self, Read};
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use tracing::debug;
/// The first few bytes of files generated by incremental compilation. /// The first few bytes of files generated by incremental compilation.
const FILE_MAGIC: &[u8] = b"RSIC"; const FILE_MAGIC: &[u8] = b"RSIC";

View file

@ -125,6 +125,7 @@ use std::path::{Path, PathBuf};
use std::time::{Duration, SystemTime, UNIX_EPOCH}; use std::time::{Duration, SystemTime, UNIX_EPOCH};
use rand::{thread_rng, RngCore}; use rand::{thread_rng, RngCore};
use tracing::debug;
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;

View file

@ -12,6 +12,7 @@ use rustc_session::Session;
use rustc_span::ErrorGuaranteed; use rustc_span::ErrorGuaranteed;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::sync::Arc; use std::sync::Arc;
use tracing::{debug, warn};
use super::data::*; use super::data::*;
use super::file_format; use super::file_format;

View file

@ -11,6 +11,7 @@ use rustc_serialize::Encodable as RustcEncodable;
use rustc_session::Session; use rustc_session::Session;
use std::fs; use std::fs;
use std::sync::Arc; use std::sync::Arc;
use tracing::debug;
use super::data::*; use super::data::*;
use super::dirty_clean; use super::dirty_clean;

View file

@ -10,6 +10,7 @@ use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
use rustc_session::Session; use rustc_session::Session;
use std::fs as std_fs; use std::fs as std_fs;
use std::path::Path; use std::path::Path;
use tracing::debug;
/// Copies a CGU work product to the incremental compilation directory, so next compilation can /// Copies a CGU work product to the incremental compilation directory, so next compilation can
/// find and reuse it. /// find and reuse it.

View file

@ -11,7 +11,6 @@ use rustc_data_structures::sync::Lrc;
use rustc_errors::registry::Registry; use rustc_errors::registry::Registry;
use rustc_errors::{DiagCtxt, ErrorGuaranteed}; use rustc_errors::{DiagCtxt, ErrorGuaranteed};
use rustc_lint::LintStore; use rustc_lint::LintStore;
use rustc_middle::ty; use rustc_middle::ty;
use rustc_middle::ty::CurrentGcx; use rustc_middle::ty::CurrentGcx;
use rustc_middle::util::Providers; use rustc_middle::util::Providers;
@ -28,6 +27,7 @@ use rustc_span::FileName;
use std::path::PathBuf; use std::path::PathBuf;
use std::result; use std::result;
use std::sync::Arc; use std::sync::Arc;
use tracing::trace;
pub type Result<T> = result::Result<T, ErrorGuaranteed>; pub type Result<T> = result::Result<T, ErrorGuaranteed>;

View file

@ -4,9 +4,6 @@
#![feature(thread_spawn_unchecked)] #![feature(thread_spawn_unchecked)]
#![feature(try_blocks)] #![feature(try_blocks)]
#[macro_use]
extern crate tracing;
mod callbacks; mod callbacks;
mod errors; mod errors;
pub mod interface; pub mod interface;

View file

@ -39,6 +39,7 @@ use std::io::{self, BufWriter, Write};
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::sync::LazyLock; use std::sync::LazyLock;
use std::{env, fs, iter}; use std::{env, fs, iter};
use tracing::{info, instrument};
pub fn parse<'a>(sess: &'a Session) -> PResult<'a, ast::Crate> { pub fn parse<'a>(sess: &'a Session) -> PResult<'a, ast::Crate> {
let krate = sess.time("parse_crate", || match &sess.io.input { let krate = sess.time("parse_crate", || match &sess.io.input {

View file

@ -1,5 +1,4 @@
use crate::errors; use crate::errors;
use info;
use rustc_ast as ast; use rustc_ast as ast;
use rustc_codegen_ssa::traits::CodegenBackend; use rustc_codegen_ssa::traits::CodegenBackend;
#[cfg(parallel_compiler)] #[cfg(parallel_compiler)]
@ -23,6 +22,7 @@ use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::OnceLock; use std::sync::OnceLock;
use std::thread; use std::thread;
use std::{env, iter}; use std::{env, iter};
use tracing::info;
/// Function pointer type that constructs a new CodegenBackend. /// Function pointer type that constructs a new CodegenBackend.
pub type MakeBackendFn = fn() -> Box<dyn CodegenBackend>; pub type MakeBackendFn = fn() -> Box<dyn CodegenBackend>;

View file

@ -70,6 +70,7 @@ use rustc_target::abi::Abi;
use rustc_trait_selection::infer::{InferCtxtExt, TyCtxtInferExt}; use rustc_trait_selection::infer::{InferCtxtExt, TyCtxtInferExt};
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _; use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _;
use rustc_trait_selection::traits::{self, misc::type_allowed_to_implement_copy}; use rustc_trait_selection::traits::{self, misc::type_allowed_to_implement_copy};
use tracing::debug;
use crate::nonstandard_style::{method_context, MethodLateContext}; use crate::nonstandard_style::{method_context, MethodLateContext};

View file

@ -39,10 +39,10 @@ use rustc_span::edit_distance::find_best_match_for_names;
use rustc_span::symbol::{sym, Ident, Symbol}; use rustc_span::symbol::{sym, Ident, Symbol};
use rustc_span::Span; use rustc_span::Span;
use rustc_target::abi; use rustc_target::abi;
use std::cell::Cell; use std::cell::Cell;
use std::iter; use std::iter;
use std::slice; use std::slice;
use tracing::debug;
mod diagnostics; mod diagnostics;

View file

@ -9,6 +9,7 @@ use rustc_errors::{elided_lifetime_in_path_suggestion, DiagArgValue, MultiSpan};
use rustc_middle::middle::stability; use rustc_middle::middle::stability;
use rustc_session::lint::{BuiltinLintDiag, Lint}; use rustc_session::lint::{BuiltinLintDiag, Lint};
use rustc_span::BytePos; use rustc_span::BytePos;
use tracing::debug;
use crate::{lints, EarlyContext, LintContext as _}; use crate::{lints, EarlyContext, LintContext as _};

View file

@ -26,6 +26,7 @@ use rustc_session::lint::{BufferedEarlyLint, LintBuffer, LintPass};
use rustc_session::Session; use rustc_session::Session;
use rustc_span::symbol::Ident; use rustc_span::symbol::Ident;
use rustc_span::Span; use rustc_span::Span;
use tracing::debug;
macro_rules! lint_callback { ($cx:expr, $f:ident, $($args:expr),*) => ({ macro_rules! lint_callback { ($cx:expr, $f:ident, $($args:expr),*) => ({
$cx.pass.$f(&$cx.context, $($args),*); $cx.pass.$f(&$cx.context, $($args),*);

View file

@ -8,6 +8,7 @@ use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
use rustc_session::declare_lint; use rustc_session::declare_lint;
use rustc_span::{sym, Span, Symbol}; use rustc_span::{sym, Span, Symbol};
use rustc_target::abi::FIRST_VARIANT; use rustc_target::abi::FIRST_VARIANT;
use tracing::{debug, instrument};
use crate::lints::{BuiltinClashingExtern, BuiltinClashingExternSub}; use crate::lints::{BuiltinClashingExtern, BuiltinClashingExternSub};
use crate::{types, LintVec}; use crate::{types, LintVec};

View file

@ -15,6 +15,7 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::hygiene::{ExpnKind, MacroKind}; use rustc_span::hygiene::{ExpnKind, MacroKind};
use rustc_span::symbol::{kw, sym, Symbol}; use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span; use rustc_span::Span;
use tracing::debug;
declare_tool_lint! { declare_tool_lint! {
/// The `default_hash_type` lint detects use of [`std::collections::HashMap`]/[`std::collections::HashSet`], /// The `default_hash_type` lint detects use of [`std::collections::HashMap`]/[`std::collections::HashSet`],

View file

@ -26,9 +26,9 @@ use rustc_middle::ty::{self, TyCtxt};
use rustc_session::lint::LintPass; use rustc_session::lint::LintPass;
use rustc_session::Session; use rustc_session::Session;
use rustc_span::Span; use rustc_span::Span;
use std::any::Any; use std::any::Any;
use std::cell::Cell; use std::cell::Cell;
use tracing::debug;
/// Extract the [`LintStore`] from [`Session`]. /// Extract the [`LintStore`] from [`Session`].
/// ///

View file

@ -41,6 +41,7 @@ use rustc_session::parse::feature_err;
use rustc_session::Session; use rustc_session::Session;
use rustc_span::symbol::{sym, Symbol}; use rustc_span::symbol::{sym, Symbol};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use tracing::{debug, instrument};
use crate::errors::{ use crate::errors::{
MalformedAttribute, MalformedAttributeSub, OverruledAttribute, OverruledAttributeSub, MalformedAttribute, MalformedAttributeSub, OverruledAttribute, OverruledAttributeSub,

View file

@ -39,9 +39,6 @@
#![feature(rustc_attrs)] #![feature(rustc_attrs)]
#![allow(internal_features)] #![allow(internal_features)]
#[macro_use]
extern crate tracing;
mod async_fn_in_trait; mod async_fn_in_trait;
pub mod builtin; pub mod builtin;
mod context; mod context;

View file

@ -31,9 +31,9 @@ use rustc_span::{Span, Symbol};
use rustc_target::abi::{Abi, Size, WrappingRange}; use rustc_target::abi::{Abi, Size, WrappingRange};
use rustc_target::abi::{Integer, TagEncoding, Variants}; use rustc_target::abi::{Integer, TagEncoding, Variants};
use rustc_target::spec::abi::Abi as SpecAbi; use rustc_target::spec::abi::Abi as SpecAbi;
use std::iter; use std::iter;
use std::ops::ControlFlow; use std::ops::ControlFlow;
use tracing::debug;
declare_lint! { declare_lint! {
/// The `unused_comparisons` lint detects comparisons made useless by /// The `unused_comparisons` lint detects comparisons made useless by

View file

@ -22,6 +22,7 @@ use rustc_span::symbol::{kw, sym};
use rustc_span::{BytePos, Span}; use rustc_span::{BytePos, Span};
use std::iter; use std::iter;
use std::ops::ControlFlow; use std::ops::ControlFlow;
use tracing::instrument;
declare_lint! { declare_lint! {
/// The `unused_must_use` lint detects unused result of a type flagged as /// The `unused_must_use` lint detects unused result of a type flagged as

View file

@ -27,6 +27,7 @@ use rustc_span::edition::Edition;
use rustc_span::symbol::{sym, Symbol}; use rustc_span::symbol::{sym, Symbol};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use rustc_target::spec::{PanicStrategy, Target, TargetTriple}; use rustc_target::spec::{PanicStrategy, Target, TargetTriple};
use tracing::{debug, info, trace};
use proc_macro::bridge::client::ProcMacro; use proc_macro::bridge::client::ProcMacro;
use std::error::Error; use std::error::Error;

View file

@ -65,6 +65,7 @@ use rustc_middle::ty::TyCtxt;
use rustc_session::config::CrateType; use rustc_session::config::CrateType;
use rustc_session::cstore::CrateDepKind; use rustc_session::cstore::CrateDepKind;
use rustc_session::cstore::LinkagePreference::{self, RequireDynamic, RequireStatic}; use rustc_session::cstore::LinkagePreference::{self, RequireDynamic, RequireStatic};
use tracing::info;
pub(crate) fn calculate(tcx: TyCtxt<'_>) -> Dependencies { pub(crate) fn calculate(tcx: TyCtxt<'_>) -> Dependencies {
tcx.crate_types() tcx.crate_types()

View file

@ -20,9 +20,6 @@
extern crate proc_macro; extern crate proc_macro;
#[macro_use]
extern crate tracing;
pub use rmeta::provide; pub use rmeta::provide;
mod dependency_format; mod dependency_format;

View file

@ -231,6 +231,7 @@ use rustc_session::Session;
use rustc_span::symbol::Symbol; use rustc_span::symbol::Symbol;
use rustc_span::Span; use rustc_span::Span;
use rustc_target::spec::{Target, TargetTriple}; use rustc_target::spec::{Target, TargetTriple};
use tracing::{debug, info};
use snap::read::FrameDecoder; use snap::read::FrameDecoder;
use std::borrow::Cow; use std::borrow::Cow;

View file

@ -28,6 +28,7 @@ use rustc_session::cstore::{CrateSource, ExternCrate};
use rustc_session::Session; use rustc_session::Session;
use rustc_span::symbol::kw; use rustc_span::symbol::kw;
use rustc_span::{BytePos, Pos, SpanData, SpanDecoder, SyntaxContext, DUMMY_SP}; use rustc_span::{BytePos, Pos, SpanData, SpanDecoder, SyntaxContext, DUMMY_SP};
use tracing::debug;
use proc_macro::bridge::client::ProcMacro; use proc_macro::bridge::client::ProcMacro;
use std::iter::TrustedLen; use std::iter::TrustedLen;

View file

@ -33,6 +33,7 @@ use std::collections::hash_map::Entry;
use std::fs::File; use std::fs::File;
use std::io::{Read, Seek, Write}; use std::io::{Read, Seek, Write};
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use tracing::{debug, instrument, trace};
pub(super) struct EncodeContext<'a, 'tcx> { pub(super) struct EncodeContext<'a, 'tcx> {
opaque: opaque::FileEncoder, opaque: opaque::FileEncoder,

View file

@ -2,6 +2,7 @@ use crate::rmeta::*;
use rustc_hir::def::CtorOf; use rustc_hir::def::CtorOf;
use rustc_index::Idx; use rustc_index::Idx;
use tracing::trace;
pub(super) trait IsDefault: Default { pub(super) trait IsDefault: Default {
fn is_default(&self) -> bool; fn is_default(&self) -> bool;

View file

@ -10,6 +10,7 @@ use rustc_hir::def_id::{DefId, DefPathHash};
use rustc_session::StableCrateId; use rustc_session::StableCrateId;
use rustc_span::def_id::{CrateNum, LocalDefId}; use rustc_span::def_id::{CrateNum, LocalDefId};
use rustc_span::{ExpnHash, ExpnId, DUMMY_SP}; use rustc_span::{ExpnHash, ExpnId, DUMMY_SP};
use tracing::instrument;
macro_rules! declare_hooks { macro_rules! declare_hooks {
($($(#[$attr:meta])*hook $name:ident($($arg:ident: $K:ty),*) -> $V:ty;)*) => { ($($(#[$attr:meta])*hook $name:ident($($arg:ident: $K:ty),*) -> $V:ty;)*) => {

View file

@ -63,9 +63,6 @@
#![feature(yeet_expr)] #![feature(yeet_expr)]
// tidy-alphabetical-end // tidy-alphabetical-end
#[macro_use]
extern crate tracing;
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;

View file

@ -12,6 +12,7 @@ use rustc_session::lint::{
use rustc_session::Session; use rustc_session::Session;
use rustc_span::hygiene::{ExpnKind, MacroKind}; use rustc_span::hygiene::{ExpnKind, MacroKind};
use rustc_span::{symbol, DesugaringKind, Span, Symbol, DUMMY_SP}; use rustc_span::{symbol, DesugaringKind, Span, Symbol, DUMMY_SP};
use tracing::instrument;
use crate::ty::TyCtxt; use crate::ty::TyCtxt;

View file

@ -13,6 +13,7 @@ use rustc_hir as hir;
use rustc_hir::{HirId, HirIdMap, Node}; use rustc_hir::{HirId, HirIdMap, Node};
use rustc_macros::{HashStable, TyDecodable, TyEncodable}; use rustc_macros::{HashStable, TyDecodable, TyEncodable};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use tracing::debug;
use std::fmt; use std::fmt;
use std::ops::Deref; use std::ops::Deref;

Some files were not shown because too many files have changed in this diff Show more