Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 7a5d814

Browse files
committed
Remove #[macro_use] extern crate tracing from rustc_const_eval.
1 parent c7da1a5 commit 7a5d814

27 files changed

+29
-3
lines changed

compiler/rustc_const_eval/src/const_eval/eval_queries.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::sync::atomic::Ordering::Relaxed;
22

33
use either::{Left, Right};
4+
use tracing::{debug, instrument, trace};
45

56
use rustc_hir::def::DefKind;
67
use rustc_middle::bug;

compiler/rustc_const_eval/src/const_eval/machine.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use rustc_span::symbol::{sym, Symbol};
2121
use rustc_span::Span;
2222
use rustc_target::abi::{Align, Size};
2323
use rustc_target::spec::abi::Abi as CallAbi;
24+
use tracing::debug;
2425

2526
use crate::errors::{LongRunning, LongRunningWarn};
2627
use crate::fluent_generated as fluent;

compiler/rustc_const_eval/src/const_eval/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use rustc_middle::mir::interpret::InterpErrorInfo;
66
use rustc_middle::query::{Key, TyCtxtAt};
77
use rustc_middle::ty::{self, Ty, TyCtxt};
88
use rustc_target::abi::VariantIdx;
9+
use tracing::instrument;
910

1011
use crate::interpret::{format_interp_error, InterpCx};
1112

compiler/rustc_const_eval/src/const_eval/valtrees.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use rustc_middle::ty::layout::{LayoutCx, LayoutOf, TyAndLayout};
66
use rustc_middle::ty::{self, ScalarInt, Ty, TyCtxt};
77
use rustc_span::DUMMY_SP;
88
use rustc_target::abi::{Abi, VariantIdx};
9+
use tracing::{debug, instrument, trace};
910

1011
use super::eval_queries::{mk_eval_cx_to_read_const_val, op_to_const};
1112
use super::machine::CompileTimeEvalContext;

compiler/rustc_const_eval/src/interpret/cast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use rustc_middle::ty::{self, FloatTy, Ty};
1010
use rustc_middle::{bug, span_bug};
1111
use rustc_target::abi::Integer;
1212
use rustc_type_ir::TyKind::*;
13+
use tracing::trace;
1314

1415
use super::{
1516
err_inval, throw_ub, throw_ub_custom, util::ensure_monomorphic_enough, FnVal, ImmTy, Immediate,

compiler/rustc_const_eval/src/interpret/discriminant.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use rustc_middle::ty::layout::{LayoutOf, PrimitiveExt};
66
use rustc_middle::ty::{self, ScalarInt, Ty};
77
use rustc_target::abi::{self, TagEncoding};
88
use rustc_target::abi::{VariantIdx, Variants};
9+
use tracing::{instrument, trace};
910

1011
use super::{
1112
err_ub, throw_ub, ImmTy, InterpCx, InterpResult, Machine, Readable, Scalar, Writeable,

compiler/rustc_const_eval/src/interpret/eval_context.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use std::cell::Cell;
22
use std::{fmt, mem};
33

44
use either::{Either, Left, Right};
5+
use tracing::{debug, info, info_span, instrument, trace};
56

67
use hir::CRATE_HIR_ID;
78
use rustc_errors::DiagCtxt;

compiler/rustc_const_eval/src/interpret/intern.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use rustc_middle::query::TyCtxtAt;
2323
use rustc_middle::ty::layout::TyAndLayout;
2424
use rustc_span::def_id::LocalDefId;
2525
use rustc_span::sym;
26+
use tracing::{instrument, trace};
2627

2728
use super::{err_ub, AllocId, Allocation, InterpCx, MPlaceTy, Machine, MemoryKind, PlaceTy};
2829
use crate::const_eval;

compiler/rustc_const_eval/src/interpret/intrinsics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use rustc_middle::{
1414
};
1515
use rustc_span::symbol::{sym, Symbol};
1616
use rustc_target::abi::Size;
17+
use tracing::trace;
1718

1819
use super::{
1920
err_inval, err_ub_custom, err_unsup_format, memory::MemoryKind, throw_inval, throw_ub_custom,

compiler/rustc_const_eval/src/interpret/memory.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ use rustc_middle::mir::display_allocation;
2121
use rustc_middle::ty::{self, Instance, ParamEnv, Ty, TyCtxt};
2222
use rustc_target::abi::{Align, HasDataLayout, Size};
2323

24+
use tracing::{debug, instrument, trace};
25+
2426
use crate::fluent_generated as fluent;
2527

2628
use super::{

compiler/rustc_const_eval/src/interpret/operand.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use std::assert_matches::assert_matches;
55

66
use either::{Either, Left, Right};
7+
use tracing::trace;
78

89
use rustc_hir::def::Namespace;
910
use rustc_middle::mir::interpret::ScalarSizeMismatch;

compiler/rustc_const_eval/src/interpret/operator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
77
use rustc_middle::ty::{self, FloatTy, ScalarInt};
88
use rustc_middle::{bug, span_bug};
99
use rustc_span::symbol::sym;
10+
use tracing::trace;
1011

1112
use super::{err_ub, throw_ub, ImmTy, InterpCx, Machine};
1213

compiler/rustc_const_eval/src/interpret/place.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use std::assert_matches::assert_matches;
66

77
use either::{Either, Left, Right};
8+
use tracing::{instrument, trace};
89

910
use rustc_ast::Mutability;
1011
use rustc_middle::mir;

compiler/rustc_const_eval/src/interpret/projection.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ use rustc_middle::{bug, span_bug};
1818
use rustc_target::abi::Size;
1919
use rustc_target::abi::{self, VariantIdx};
2020

21+
use tracing::{debug, instrument};
22+
2123
use super::{
2224
throw_ub, throw_unsup_format, InterpCx, InterpResult, MPlaceTy, Machine, MemPlaceMeta, OpTy,
2325
Provenance, Scalar,

compiler/rustc_const_eval/src/interpret/step.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//! The main entry point is the `step` method.
44
55
use either::Either;
6+
use tracing::{info, instrument, trace};
67

78
use rustc_index::IndexSlice;
89
use rustc_middle::mir;

compiler/rustc_const_eval/src/interpret/terminator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::borrow::Cow;
22

33
use either::Either;
4+
use tracing::trace;
45

56
use rustc_middle::span_bug;
67
use rustc_middle::{

compiler/rustc_const_eval/src/interpret/traits.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use rustc_middle::mir::interpret::{InterpResult, Pointer};
22
use rustc_middle::ty::layout::LayoutOf;
33
use rustc_middle::ty::{self, Ty, TyCtxt};
44
use rustc_target::abi::{Align, Size};
5+
use tracing::trace;
56

67
use super::util::ensure_monomorphic_enough;
78
use super::{InterpCx, Machine};

compiler/rustc_const_eval/src/interpret/util.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use rustc_middle::ty::{
77
self, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor,
88
};
99
use std::ops::ControlFlow;
10+
use tracing::debug;
1011

1112
use super::{throw_inval, InterpCx, MPlaceTy, MemPlaceMeta, MemoryKind};
1213

compiler/rustc_const_eval/src/interpret/validity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use std::fmt::Write;
88
use std::num::NonZero;
99

1010
use either::{Left, Right};
11+
use tracing::trace;
1112

1213
use hir::def::DefKind;
1314
use rustc_ast::Mutability;

compiler/rustc_const_eval/src/interpret/visitor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use rustc_middle::mir::interpret::InterpResult;
66
use rustc_middle::ty::{self, Ty};
77
use rustc_target::abi::FieldIdx;
88
use rustc_target::abi::{FieldsShape, VariantIdx, Variants};
9+
use tracing::trace;
910

1011
use std::num::NonZero;
1112

compiler/rustc_const_eval/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
#![feature(yeet_expr)]
1515
#![feature(if_let_guard)]
1616

17-
#[macro_use]
18-
extern crate tracing;
19-
2017
pub mod const_eval;
2118
mod errors;
2219
pub mod interpret;

compiler/rustc_const_eval/src/transform/check_consts/check.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ use rustc_type_ir::visit::{TypeSuperVisitable, TypeVisitor};
2020
use std::mem;
2121
use std::ops::Deref;
2222

23+
use tracing::{debug, instrument, trace};
24+
2325
use super::ops::{self, NonConstOp, Status};
2426
use super::qualifs::{self, HasMutInterior, NeedsDrop, NeedsNonConstDrop};
2527
use super::resolver::FlowSensitiveAnalysis;

compiler/rustc_const_eval/src/transform/check_consts/ops.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use rustc_session::parse::feature_err;
1919
use rustc_span::symbol::sym;
2020
use rustc_span::{BytePos, Pos, Span, Symbol};
2121
use rustc_trait_selection::traits::SelectionContext;
22+
use tracing::debug;
2223

2324
use super::ConstCx;
2425
use crate::errors;

compiler/rustc_const_eval/src/transform/check_consts/post_drop_elaboration.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use rustc_middle::mir::visit::Visitor;
22
use rustc_middle::mir::{self, BasicBlock, Location};
33
use rustc_middle::ty::{Ty, TyCtxt};
44
use rustc_span::{symbol::sym, Span};
5+
use tracing::trace;
56

67
use super::check::Qualifs;
78
use super::ops::{self, NonConstOp};

compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use rustc_middle::ty::{self, AdtDef, GenericArgsRef, Ty};
1313
use rustc_trait_selection::traits::{
1414
ImplSource, Obligation, ObligationCause, ObligationCtxt, SelectionContext,
1515
};
16+
use tracing::{instrument, trace};
1617

1718
use super::ConstCx;
1819

compiler/rustc_const_eval/src/util/alignment.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use rustc_middle::mir::*;
22
use rustc_middle::ty::{self, TyCtxt};
33
use rustc_target::abi::Align;
4+
use tracing::debug;
45

56
/// Returns `true` if this place is allowed to be less aligned
67
/// than its containing struct (because it is within a packed

compiler/rustc_const_eval/src/util/caller_location.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use rustc_middle::query::TyCtxtAt;
55
use rustc_middle::ty::layout::LayoutOf;
66
use rustc_middle::ty::{self, Mutability};
77
use rustc_span::symbol::Symbol;
8+
use tracing::trace;
89

910
use crate::const_eval::{mk_eval_cx_to_read_const_val, CanAccessMutGlobal, CompileTimeEvalContext};
1011
use crate::interpret::*;

0 commit comments

Comments
 (0)