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

Commit 6341935

Browse files
committed
Remove extern crate tracing from numerous crates.
1 parent 52e9a23 commit 6341935

File tree

47 files changed

+47
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+47
-70
lines changed

compiler/rustc_ast/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
#![feature(negative_impls)]
2121
#![feature(stmt_expr_attributes)]
2222

23-
#[macro_use]
24-
extern crate tracing;
25-
2623
pub mod util {
2724
pub mod case;
2825
pub mod classify;

compiler/rustc_ast/src/util/literal.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use rustc_lexer::unescape::{
88
use rustc_span::symbol::{kw, sym, Symbol};
99
use rustc_span::Span;
1010
use std::{ascii, fmt, str};
11+
use tracing::debug;
1112

1213
// Escapes a string, represented as a symbol. Reuses the original symbol,
1314
// avoiding interning, if no changes are required.

compiler/rustc_ast_lowering/src/index.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use rustc_index::IndexVec;
77
use rustc_middle::span_bug;
88
use rustc_middle::ty::TyCtxt;
99
use rustc_span::{Span, DUMMY_SP};
10+
use tracing::{debug, instrument};
1011

1112
/// A visitor that walks over the HIR and collects `Node`s into a HIR map.
1213
struct NodeCollector<'a, 'hir> {

compiler/rustc_ast_lowering/src/item.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use rustc_span::{DesugaringKind, Span, Symbol};
2020
use rustc_target::spec::abi;
2121
use smallvec::{smallvec, SmallVec};
2222
use thin_vec::ThinVec;
23+
use tracing::instrument;
2324

2425
pub(super) struct ItemLowerer<'a, 'hir> {
2526
pub(super) tcx: TyCtxt<'hir>,

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@
3737
#![feature(box_patterns)]
3838
#![feature(let_chains)]
3939

40-
#[macro_use]
41-
extern crate tracing;
42-
4340
use crate::errors::{AssocTyParentheses, AssocTyParenthesesSub, MisplacedImplTrait};
44-
4541
use rustc_ast::node_id::NodeMap;
4642
use rustc_ast::ptr::P;
4743
use rustc_ast::{self as ast, *};
@@ -69,6 +65,7 @@ use rustc_span::{DesugaringKind, Span, DUMMY_SP};
6965
use smallvec::{smallvec, SmallVec};
7066
use std::collections::hash_map::Entry;
7167
use thin_vec::ThinVec;
68+
use tracing::{debug, instrument, trace};
7269

7370
macro_rules! arena_vec {
7471
($this:expr; $($x:expr),*) => (

compiler/rustc_ast_lowering/src/path.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use rustc_span::symbol::{kw, sym, Ident};
1818
use rustc_span::{BytePos, DesugaringKind, Span, Symbol, DUMMY_SP};
1919

2020
use smallvec::{smallvec, SmallVec};
21+
use tracing::{debug, instrument};
2122

2223
impl<'a, 'hir> LoweringContext<'a, 'hir> {
2324
#[instrument(level = "trace", skip(self))]

compiler/rustc_builtin_macros/src/cfg_eval.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use rustc_session::Session;
1818
use rustc_span::symbol::sym;
1919
use rustc_span::Span;
2020
use smallvec::SmallVec;
21+
use tracing::instrument;
2122

2223
pub(crate) fn expand(
2324
ecx: &mut ExtCtxt<'_>,

compiler/rustc_builtin_macros/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@
1919

2020
extern crate proc_macro;
2121

22-
#[macro_use]
23-
extern crate tracing;
24-
2522
use crate::deriving::*;
26-
2723
use rustc_expand::base::{MacroExpanderFn, ResolverExpand, SyntaxExtensionKind};
2824
use rustc_expand::proc_macro::BangProcMacro;
2925
use rustc_span::symbol::sym;

compiler/rustc_builtin_macros/src/test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use rustc_span::{ErrorGuaranteed, FileNameDisplayPreference, Span};
1212
use std::assert_matches::assert_matches;
1313
use std::iter;
1414
use thin_vec::{thin_vec, ThinVec};
15+
use tracing::debug;
1516

1617
/// #[test_case] is used by custom test authors to mark tests
1718
/// When building for test, it needs to make the item public and gensym the name

compiler/rustc_driver_impl/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
#![feature(panic_update_hook)]
1515
#![feature(result_flattening)]
1616

17-
#[macro_use]
18-
extern crate tracing;
19-
2017
use rustc_ast as ast;
2118
use rustc_codegen_ssa::{traits::CodegenBackend, CodegenErrors, CodegenResults};
2219
use rustc_const_eval::CTRL_C_RECEIVED;
@@ -46,7 +43,6 @@ use rustc_span::symbol::sym;
4643
use rustc_span::FileName;
4744
use rustc_target::json::ToJson;
4845
use rustc_target::spec::{Target, TargetTriple};
49-
5046
use std::cmp::max;
5147
use std::collections::BTreeMap;
5248
use std::env;
@@ -62,6 +58,7 @@ use std::sync::atomic::{AtomicBool, Ordering};
6258
use std::sync::{Arc, OnceLock};
6359
use std::time::{Instant, SystemTime};
6460
use time::OffsetDateTime;
61+
use tracing::trace;
6562

6663
#[allow(unused_macros)]
6764
macro do_not_use_print($($t:tt)*) {

0 commit comments

Comments
 (0)