Skip to content

Commit ee3c835

Browse files
committed
Always import all tracing macros for the entire crate instead of piecemeal by module
1 parent d3b22c7 commit ee3c835

File tree

88 files changed

+76
-119
lines changed

Some content is hidden

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

88 files changed

+76
-119
lines changed

compiler/rustc_ast/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#[macro_use]
2727
extern crate rustc_macros;
2828

29+
#[macro_use]
30+
extern crate tracing;
31+
2932
pub mod util {
3033
pub mod classify;
3134
pub mod comments;

compiler/rustc_ast/src/util/literal.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use rustc_span::symbol::{kw, sym, Symbol};
99
use rustc_span::Span;
1010

1111
use std::ascii;
12-
use tracing::debug;
1312

1413
pub enum LitError {
1514
NotLiteral,

compiler/rustc_ast_lowering/src/index.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ use rustc_session::Session;
1111
use rustc_span::source_map::SourceMap;
1212
use rustc_span::{Span, DUMMY_SP};
1313

14-
use tracing::debug;
15-
1614
/// A visitor that walks over the HIR and collects `Node`s into a HIR map.
1715
pub(super) struct NodeCollector<'a, 'hir> {
1816
/// Source map

compiler/rustc_ast_lowering/src/path.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use rustc_span::symbol::{kw, Ident};
1313
use rustc_span::{BytePos, Span, DUMMY_SP};
1414

1515
use smallvec::smallvec;
16-
use tracing::debug;
1716

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

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ use rustc_span::source_map::Spanned;
1111
use rustc_span::symbol::sym;
1212
use rustc_span::Span;
1313

14-
use tracing::debug;
15-
1614
macro_rules! gate_feature_fn {
1715
($visitor: expr, $has_feature: expr, $span: expr, $name: expr, $explain: expr, $help: expr) => {{
1816
let (visitor, has_feature, span, name, explain, help) =

compiler/rustc_ast_passes/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#![feature(let_else)]
1313
#![recursion_limit = "256"]
1414

15+
#[macro_use]
16+
extern crate tracing;
17+
1518
pub mod ast_validation;
1619
mod errors;
1720
pub mod feature_gate;

compiler/rustc_borrowck/src/diagnostics/outlives_suggestion.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use rustc_errors::Diagnostic;
66
use rustc_middle::ty::RegionVid;
77
use smallvec::SmallVec;
88
use std::collections::BTreeMap;
9-
use tracing::debug;
109

1110
use crate::MirBorrowckCtxt;
1211

compiler/rustc_builtin_macros/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
extern crate proc_macro;
1818

19+
#[macro_use]
20+
extern crate tracing;
21+
1922
use crate::deriving::*;
2023

2124
use rustc_expand::base::{MacroExpanderFn, ResolverExpand, SyntaxExtensionKind};

compiler/rustc_builtin_macros/src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ pub fn expand_test_or_bench(
335335
// extern crate test
336336
let test_extern = cx.item(sp, test_id, ast::AttrVec::new(), ast::ItemKind::ExternCrate(None));
337337

338-
tracing::debug!("synthetic test item:\n{}\n", pprust::item_to_string(&test_const));
338+
debug!("synthetic test item:\n{}\n", pprust::item_to_string(&test_const));
339339

340340
if is_stmt {
341341
vec![

compiler/rustc_builtin_macros/src/test_harness.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use rustc_span::{Span, DUMMY_SP};
1515
use rustc_target::spec::PanicStrategy;
1616
use smallvec::{smallvec, SmallVec};
1717
use thin_vec::thin_vec;
18-
use tracing::debug;
1918

2019
use std::{iter, mem};
2120

0 commit comments

Comments
 (0)