Skip to content

Commit

Permalink
Remove #[macro_use] extern crate tracing from rustc_span`.
Browse files Browse the repository at this point in the history
Because explicit macro imports are better than implicit macro imports.
  • Loading branch information
nnethercote committed May 21, 2024
1 parent 258b75e commit 232f153
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_span/src/hygiene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ use std::cell::RefCell;
use std::collections::hash_map::Entry;
use std::fmt;
use std::hash::Hash;
use tracing::{debug, trace};

/// A `SyntaxContext` represents a chain of pairs `(ExpnId, Transparency)` named "marks".
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_span/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@
// this crate without this line making `rustc_span` available.
extern crate self as rustc_span;

#[macro_use]
extern crate tracing;

use rustc_data_structures::{outline, AtomicRef};
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
use rustc_serialize::opaque::{FileEncoder, MemDecoder};
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
use tracing::debug;

mod caching_source_map_view;
pub mod source_map;
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_span/src/source_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use rustc_macros::{Decodable, Encodable};
use std::fs;
use std::io::{self, BorrowedBuf, Read};
use std::path;
use tracing::{debug, instrument, trace};

#[cfg(test)]
mod tests;
Expand Down

0 comments on commit 232f153

Please sign in to comment.