Skip to content

Commit ee5ec5a

Browse files
committed
Remove #[macro_use] extern crate tracing from rustfmt.
1 parent de02c4a commit ee5ec5a

16 files changed

+17
-2
lines changed

src/tools/rustfmt/src/attr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use rustc_ast::ast;
44
use rustc_ast::HasAttrs;
55
use rustc_span::{symbol::sym, Span};
6+
use tracing::debug;
67

78
use self::doc_comment::DocCommentFormatter;
89
use crate::comment::{contains_comment, rewrite_doc_comment, CommentStyle};

src/tools/rustfmt/src/chains.rs

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ use std::cmp::min;
6060

6161
use rustc_ast::{ast, ptr};
6262
use rustc_span::{symbol, BytePos, Span};
63+
use tracing::debug;
6364

6465
use crate::comment::{rewrite_comment, CharClasses, FullCodeCharKind, RichChar};
6566
use crate::config::{IndentStyle, Version};

src/tools/rustfmt/src/closures.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use rustc_ast::{ast, ptr};
22
use rustc_span::Span;
33
use thin_vec::thin_vec;
4+
use tracing::debug;
45

56
use crate::attr::get_attrs_from_stmt;
67
use crate::config::lists::*;

src/tools/rustfmt/src/comment.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::{borrow::Cow, iter};
44

55
use itertools::{multipeek, MultiPeek};
66
use rustc_span::Span;
7+
use tracing::{debug, trace};
78

89
use crate::config::Config;
910
use crate::rewrite::RewriteContext;

src/tools/rustfmt/src/expr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use itertools::Itertools;
55
use rustc_ast::token::{Delimiter, Lit, LitKind};
66
use rustc_ast::{ast, ptr, token, ForLoopKind, MatchKind};
77
use rustc_span::{BytePos, Span};
8+
use tracing::debug;
89

910
use crate::chains::rewrite_chain;
1011
use crate::closures;

src/tools/rustfmt/src/formatting.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::time::{Duration, Instant};
66

77
use rustc_ast::ast;
88
use rustc_span::Span;
9+
use tracing::debug;
910

1011
use self::newline_style::apply_newline_style;
1112
use crate::comment::{CharClasses, FullCodeCharKind};

src/tools/rustfmt/src/items.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use regex::Regex;
77
use rustc_ast::visit;
88
use rustc_ast::{ast, ptr};
99
use rustc_span::{symbol, BytePos, Span, DUMMY_SP};
10+
use tracing::debug;
1011

1112
use crate::attr::filter_inline_attrs;
1213
use crate::comment::{

src/tools/rustfmt/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#![allow(clippy::match_like_matches_macro)]
66
#![allow(unreachable_pub)]
77

8-
#[macro_use]
9-
extern crate tracing;
8+
// #[macro_use]
9+
// extern crate tracing;
1010

1111
// N.B. these crates are loaded from the sysroot, so they need extern crate.
1212
extern crate rustc_ast;

src/tools/rustfmt/src/macros.rs

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use rustc_span::{
2020
symbol::{self, kw},
2121
BytePos, Span, Symbol, DUMMY_SP,
2222
};
23+
use tracing::debug;
2324

2425
use crate::comment::{
2526
contains_comment, CharClasses, FindUncommented, FullCodeCharKind, LineClasses,

src/tools/rustfmt/src/matches.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::iter::repeat;
44

55
use rustc_ast::{ast, ptr, MatchKind};
66
use rustc_span::{BytePos, Span};
7+
use tracing::debug;
78

89
use crate::comment::{combine_strs_with_missing_comments, rewrite_comment, FindUncommented};
910
use crate::config::lists::*;

src/tools/rustfmt/src/missed_spans.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use rustc_span::{BytePos, Pos, Span};
2+
use tracing::debug;
23

34
use crate::comment::{is_last_comment_block, rewrite_comment, CodeCharKind, CommentCodeSlices};
45
use crate::config::file_lines::FileLines;

src/tools/rustfmt/src/modules/visitor.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use rustc_ast::ast;
22
use rustc_ast::visit::Visitor;
33
use rustc_span::Symbol;
4+
use tracing::debug;
45

56
use crate::attr::MetaVisitor;
67
use crate::parse::macros::cfg_if::parse_cfg_if;

src/tools/rustfmt/src/overflow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use itertools::Itertools;
66
use rustc_ast::token::Delimiter;
77
use rustc_ast::{ast, ptr};
88
use rustc_span::Span;
9+
use tracing::debug;
910

1011
use crate::closures;
1112
use crate::config::Version;

src/tools/rustfmt/src/test/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use crate::source_file;
1616
use crate::{is_nightly_channel, FormatReport, FormatReportFormatterBuilder, Input, Session};
1717

1818
use rustfmt_config_proc_macro::nightly_only_test;
19+
use tracing::{debug, warn};
1920

2021
mod configuration_snippet;
2122
mod mod_resolver;

src/tools/rustfmt/src/types.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use std::ops::Deref;
33
use rustc_ast::ast::{self, FnRetTy, Mutability, Term};
44
use rustc_ast::ptr;
55
use rustc_span::{symbol::kw, BytePos, Pos, Span};
6+
use tracing::debug;
67

78
use crate::comment::{combine_strs_with_missing_comments, contains_comment};
89
use crate::config::lists::*;

src/tools/rustfmt/src/visitor.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::rc::Rc;
44
use rustc_ast::{ast, token::Delimiter, visit};
55
use rustc_data_structures::sync::Lrc;
66
use rustc_span::{symbol, BytePos, Pos, Span};
7+
use tracing::debug;
78

89
use crate::attr::*;
910
use crate::comment::{contains_comment, rewrite_comment, CodeCharKind, CommentCodeSlices};

0 commit comments

Comments
 (0)