1
Fork 0

replaced log with tracing

This commit is contained in:
Gurpreet Singh 2020-08-13 23:05:01 -07:00
parent 5addb135ed
commit d2753f91b5
96 changed files with 109 additions and 104 deletions

View file

@ -11,7 +11,7 @@ doctest = false
[dependencies] [dependencies]
rustc_serialize = { path = "../librustc_serialize" } rustc_serialize = { path = "../librustc_serialize" }
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_span = { path = "../librustc_span" } rustc_span = { path = "../librustc_span" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }
rustc_index = { path = "../librustc_index" } rustc_index = { path = "../librustc_index" }

View file

@ -10,8 +10,8 @@ use rustc_lexer::unescape::{unescape_byte_literal, unescape_literal, Mode};
use rustc_span::symbol::{kw, sym, Symbol}; use rustc_span::symbol::{kw, sym, Symbol};
use rustc_span::Span; use rustc_span::Span;
use log::debug;
use std::ascii; use std::ascii;
use tracing::debug;
pub enum LitError { pub enum LitError {
NotLiteral, NotLiteral,

View file

@ -12,7 +12,7 @@ crate-type = ["dylib"]
[dependencies] [dependencies]
lazy_static = "1.0" lazy_static = "1.0"
libc = "0.2" libc = "0.2"
log = { package = "tracing", version = "0.1.18", features = ["release_max_level_info"] } tracing = { version = "0.1.18", features = ["release_max_level_info"] }
tracing-subscriber = { version = "0.2.10", default-features = false, features = ["fmt", "env-filter", "smallvec", "parking_lot", "ansi"] } tracing-subscriber = { version = "0.2.10", default-features = false, features = ["fmt", "env-filter", "smallvec", "parking_lot", "ansi"] }
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }
rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_ast_pretty = { path = "../librustc_ast_pretty" }

View file

@ -9,7 +9,7 @@
#![recursion_limit = "256"] #![recursion_limit = "256"]
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
#[macro_use] #[macro_use]
extern crate lazy_static; extern crate lazy_static;
@ -1224,13 +1224,13 @@ pub fn install_ice_hook() {
} }
/// This allows tools to enable rust logging without having to magically match rustc's /// This allows tools to enable rust logging without having to magically match rustc's
/// log crate version. /// tracing crate version.
pub fn init_rustc_env_logger() { pub fn init_rustc_env_logger() {
init_env_logger("RUSTC_LOG") init_env_logger("RUSTC_LOG")
} }
/// This allows tools to enable rust logging without having to magically match rustc's /// This allows tools to enable rust logging without having to magically match rustc's
/// log crate version. In contrast to `init_rustc_env_logger` it allows you to choose an env var /// tracing crate version. In contrast to `init_rustc_env_logger` it allows you to choose an env var
/// other than `RUSTC_LOG`. /// other than `RUSTC_LOG`.
pub fn init_env_logger(env: &str) { pub fn init_env_logger(env: &str) {
// Don't register a dispatcher if there's no filter to print anything // Don't register a dispatcher if there's no filter to print anything

View file

@ -10,7 +10,7 @@ path = "lib.rs"
doctest = false doctest = false
[dependencies] [dependencies]
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_serialize = { path = "../librustc_serialize" } rustc_serialize = { path = "../librustc_serialize" }
rustc_span = { path = "../librustc_span" } rustc_span = { path = "../librustc_span" }
rustc_macros = { path = "../librustc_macros" } rustc_macros = { path = "../librustc_macros" }

View file

@ -1,11 +1,11 @@
use crate::{Applicability, Handler, Level, StashKey}; use crate::{Applicability, Handler, Level, StashKey};
use crate::{Diagnostic, DiagnosticId, DiagnosticStyledString}; use crate::{Diagnostic, DiagnosticId, DiagnosticStyledString};
use log::debug;
use rustc_span::{MultiSpan, Span}; use rustc_span::{MultiSpan, Span};
use std::fmt::{self, Debug}; use std::fmt::{self, Debug};
use std::ops::{Deref, DerefMut}; use std::ops::{Deref, DerefMut};
use std::thread::panicking; use std::thread::panicking;
use tracing::debug;
/// Used for emitting structured error messages and other diagnostic information. /// Used for emitting structured error messages and other diagnostic information.
/// ///

View file

@ -18,7 +18,6 @@ use crate::{
pluralize, CodeSuggestion, Diagnostic, DiagnosticId, Level, SubDiagnostic, SuggestionStyle, pluralize, CodeSuggestion, Diagnostic, DiagnosticId, Level, SubDiagnostic, SuggestionStyle,
}; };
use log::*;
use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::sync::Lrc; use rustc_data_structures::sync::Lrc;
use rustc_span::hygiene::{ExpnKind, MacroKind}; use rustc_span::hygiene::{ExpnKind, MacroKind};
@ -30,6 +29,7 @@ use std::iter;
use std::path::Path; use std::path::Path;
use termcolor::{Ansi, BufferWriter, ColorChoice, ColorSpec, StandardStream}; use termcolor::{Ansi, BufferWriter, ColorChoice, ColorSpec, StandardStream};
use termcolor::{Buffer, Color, WriteColor}; use termcolor::{Buffer, Color, WriteColor};
use tracing::*;
/// Default column width, used in tests and when terminal dimensions cannot be determined. /// Default column width, used in tests and when terminal dimensions cannot be determined.
const DEFAULT_COLUMN_WIDTH: usize = 140; const DEFAULT_COLUMN_WIDTH: usize = 140;

View file

@ -11,7 +11,7 @@ extern crate rustc_macros;
pub use emitter::ColorConfig; pub use emitter::ColorConfig;
use log::debug; use tracing::debug;
use Level::*; use Level::*;
use emitter::{is_case_difference, Emitter, EmitterWriter}; use emitter::{is_case_difference, Emitter, EmitterWriter};

View file

@ -12,7 +12,7 @@ doctest = false
[dependencies] [dependencies]
rustc_serialize = { path = "../librustc_serialize" } rustc_serialize = { path = "../librustc_serialize" }
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_span = { path = "../librustc_span" } rustc_span = { path = "../librustc_span" }
rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_ast_pretty = { path = "../librustc_ast_pretty" }
rustc_ast_passes = { path = "../librustc_ast_passes" } rustc_ast_passes = { path = "../librustc_ast_passes" }

View file

@ -25,10 +25,10 @@ use rustc_span::hygiene::Transparency;
use rustc_span::symbol::{kw, sym, Ident, MacroRulesNormalizedIdent}; use rustc_span::symbol::{kw, sym, Ident, MacroRulesNormalizedIdent};
use rustc_span::Span; use rustc_span::Span;
use log::debug;
use std::borrow::Cow; use std::borrow::Cow;
use std::collections::hash_map::Entry; use std::collections::hash_map::Entry;
use std::{mem, slice}; use std::{mem, slice};
use tracing::debug;
crate struct ParserAnyMacro<'a> { crate struct ParserAnyMacro<'a> {
parser: Parser<'a>, parser: Parser<'a>,

View file

@ -18,5 +18,5 @@ rustc_span = { path = "../librustc_span" }
rustc_serialize = { path = "../librustc_serialize" } rustc_serialize = { path = "../librustc_serialize" }
rustc_ast = { path = "../librustc_ast" } rustc_ast = { path = "../librustc_ast" }
lazy_static = "1" lazy_static = "1"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
smallvec = { version = "1.0", features = ["union", "may_dangle"] } smallvec = { version = "1.0", features = ["union", "may_dangle"] }

View file

@ -15,9 +15,9 @@ use rustc_index::vec::IndexVec;
use rustc_span::hygiene::ExpnId; use rustc_span::hygiene::ExpnId;
use rustc_span::symbol::{sym, Symbol}; use rustc_span::symbol::{sym, Symbol};
use log::debug;
use std::fmt::Write; use std::fmt::Write;
use std::hash::Hash; use std::hash::Hash;
use tracing::debug;
/// The `DefPathTable` maps `DefIndex`es to `DefKey`s and vice versa. /// The `DefPathTable` maps `DefIndex`es to `DefKey`s and vice versa.
/// Internally the `DefPathTable` holds a tree of `DefKey`s, where each `DefKey` /// Internally the `DefPathTable` holds a tree of `DefKey`s, where each `DefKey`

View file

@ -11,7 +11,7 @@ doctest = false
[dependencies] [dependencies]
rustc_graphviz = { path = "../librustc_graphviz" } rustc_graphviz = { path = "../librustc_graphviz" }
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rand = "0.7" rand = "0.7"
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }

View file

@ -8,7 +8,7 @@
#[macro_use] #[macro_use]
extern crate rustc_middle; extern crate rustc_middle;
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
mod assert_dep_graph; mod assert_dep_graph;
pub mod assert_module_sources; pub mod assert_module_sources;

View file

@ -11,7 +11,7 @@ doctest = false
[dependencies] [dependencies]
rustc_graphviz = { path = "../librustc_graphviz" } rustc_graphviz = { path = "../librustc_graphviz" }
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }
rustc_errors = { path = "../librustc_errors" } rustc_errors = { path = "../librustc_errors" }

View file

@ -33,7 +33,7 @@ extern crate rustc_macros;
#[macro_use] #[macro_use]
extern crate rustc_data_structures; extern crate rustc_data_structures;
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
#[macro_use] #[macro_use]
extern crate rustc_middle; extern crate rustc_middle;

View file

@ -11,7 +11,7 @@ doctest = false
[dependencies] [dependencies]
libc = "0.2" libc = "0.2"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rayon = { version = "0.3.0", package = "rustc-rayon" } rayon = { version = "0.3.0", package = "rustc-rayon" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] } smallvec = { version = "1.0", features = ["union", "may_dangle"] }
rustc_ast = { path = "../librustc_ast" } rustc_ast = { path = "../librustc_ast" }

View file

@ -198,7 +198,7 @@ pub fn create_compiler_and_run<R>(config: Config, f: impl FnOnce(&Compiler) -> R
} }
pub fn run_compiler<R: Send>(mut config: Config, f: impl FnOnce(&Compiler) -> R + Send) -> R { pub fn run_compiler<R: Send>(mut config: Config, f: impl FnOnce(&Compiler) -> R + Send) -> R {
log::trace!("run_compiler"); tracing::trace!("run_compiler");
let stderr = config.stderr.take(); let stderr = config.stderr.take();
util::setup_callbacks_and_run_in_thread_pool_with_globals( util::setup_callbacks_and_run_in_thread_pool_with_globals(
config.opts.edition, config.opts.edition,

View file

@ -2,7 +2,6 @@ use crate::interface::{Compiler, Result};
use crate::proc_macro_decls; use crate::proc_macro_decls;
use crate::util; use crate::util;
use log::{info, warn};
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use rustc_ast::mut_visit::MutVisitor; use rustc_ast::mut_visit::MutVisitor;
use rustc_ast::{self, ast, visit}; use rustc_ast::{self, ast, visit};
@ -39,6 +38,7 @@ use rustc_span::symbol::Symbol;
use rustc_span::{FileName, RealFileName}; use rustc_span::{FileName, RealFileName};
use rustc_trait_selection::traits; use rustc_trait_selection::traits;
use rustc_typeck as typeck; use rustc_typeck as typeck;
use tracing::{info, warn};
use rustc_serialize::json; use rustc_serialize::json;
use tempfile::Builder as TempFileBuilder; use tempfile::Builder as TempFileBuilder;
@ -104,7 +104,7 @@ pub fn configure_and_expand(
krate: ast::Crate, krate: ast::Crate,
crate_name: &str, crate_name: &str,
) -> Result<(ast::Crate, BoxedResolver)> { ) -> Result<(ast::Crate, BoxedResolver)> {
log::trace!("configure_and_expand"); tracing::trace!("configure_and_expand");
// Currently, we ignore the name resolution data structures for the purposes of dependency // Currently, we ignore the name resolution data structures for the purposes of dependency
// tracking. Instead we will run name resolution and include its output in the hash of each // tracking. Instead we will run name resolution and include its output in the hash of each
// item, much like we do for macro expansion. In other words, the hash reflects not just // item, much like we do for macro expansion. In other words, the hash reflects not just
@ -229,7 +229,7 @@ fn configure_and_expand_inner<'a>(
resolver_arenas: &'a ResolverArenas<'a>, resolver_arenas: &'a ResolverArenas<'a>,
metadata_loader: &'a MetadataLoaderDyn, metadata_loader: &'a MetadataLoaderDyn,
) -> Result<(ast::Crate, Resolver<'a>)> { ) -> Result<(ast::Crate, Resolver<'a>)> {
log::trace!("configure_and_expand_inner"); tracing::trace!("configure_and_expand_inner");
pre_expansion_lint(sess, lint_store, &krate); pre_expansion_lint(sess, lint_store, &krate);
let mut resolver = Resolver::new(sess, &krate, crate_name, metadata_loader, &resolver_arenas); let mut resolver = Resolver::new(sess, &krate, crate_name, metadata_loader, &resolver_arenas);
@ -342,7 +342,7 @@ fn configure_and_expand_inner<'a>(
}); });
if let Some(PpMode::PpmSource(PpSourceMode::PpmEveryBodyLoops)) = sess.opts.pretty { if let Some(PpMode::PpmSource(PpSourceMode::PpmEveryBodyLoops)) = sess.opts.pretty {
log::debug!("replacing bodies with loop {{}}"); tracing::debug!("replacing bodies with loop {{}}");
util::ReplaceBodyWithLoop::new(&mut resolver).visit_crate(&mut krate); util::ReplaceBodyWithLoop::new(&mut resolver).visit_crate(&mut krate);
} }

View file

@ -168,7 +168,7 @@ impl<'tcx> Queries<'tcx> {
pub fn expansion( pub fn expansion(
&self, &self,
) -> Result<&Query<(ast::Crate, Steal<Rc<RefCell<BoxedResolver>>>, Lrc<LintStore>)>> { ) -> Result<&Query<(ast::Crate, Steal<Rc<RefCell<BoxedResolver>>>, Lrc<LintStore>)>> {
log::trace!("expansion"); tracing::trace!("expansion");
self.expansion.compute(|| { self.expansion.compute(|| {
let crate_name = self.crate_name()?.peek().clone(); let crate_name = self.crate_name()?.peek().clone();
let (krate, lint_store) = self.register_plugins()?.take(); let (krate, lint_store) = self.register_plugins()?.take();

View file

@ -1,4 +1,3 @@
use log::info;
use rustc_ast::ast::{AttrVec, BlockCheckMode}; use rustc_ast::ast::{AttrVec, BlockCheckMode};
use rustc_ast::mut_visit::{visit_clobber, MutVisitor, *}; use rustc_ast::mut_visit::{visit_clobber, MutVisitor, *};
use rustc_ast::ptr::P; use rustc_ast::ptr::P;
@ -33,6 +32,7 @@ use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex, Once}; use std::sync::{Arc, Mutex, Once};
#[cfg(not(parallel_compiler))] #[cfg(not(parallel_compiler))]
use std::{panic, thread}; use std::{panic, thread};
use tracing::info;
/// Adds `target_feature = "..."` cfgs for a variety of platform /// Adds `target_feature = "..."` cfgs for a variety of platform
/// specific features (SSE, NEON etc.). /// specific features (SSE, NEON etc.).

View file

@ -9,7 +9,7 @@ name = "rustc_lint"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
log = { package = "tracing", version = "0.1" } tracing = "0.1"
unicode-security = "0.0.5" unicode-security = "0.0.5"
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }
rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_ast_pretty = { path = "../librustc_ast_pretty" }

View file

@ -51,8 +51,8 @@ use rustc_trait_selection::traits::misc::can_type_implement_copy;
use crate::nonstandard_style::{method_context, MethodLateContext}; use crate::nonstandard_style::{method_context, MethodLateContext};
use log::{debug, trace};
use std::fmt::Write; use std::fmt::Write;
use tracing::{debug, trace};
// hardwired lints from librustc_middle // hardwired lints from librustc_middle
pub use rustc_session::lint::builtin::*; pub use rustc_session::lint::builtin::*;

View file

@ -23,8 +23,8 @@ use rustc_session::Session;
use rustc_span::symbol::Ident; use rustc_span::symbol::Ident;
use rustc_span::Span; use rustc_span::Span;
use log::debug;
use std::slice; use std::slice;
use tracing::debug;
macro_rules! run_early_pass { ($cx:expr, $f:ident, $($args:expr),*) => ({ macro_rules! run_early_pass { ($cx:expr, $f:ident, $($args:expr),*) => ({
$cx.pass.$f(&$cx.context, $($args),*); $cx.pass.$f(&$cx.context, $($args),*);

View file

@ -28,10 +28,10 @@ use rustc_session::lint::LintPass;
use rustc_span::symbol::Symbol; use rustc_span::symbol::Symbol;
use rustc_span::Span; use rustc_span::Span;
use log::debug;
use std::any::Any; use std::any::Any;
use std::cell::Cell; use std::cell::Cell;
use std::slice; use std::slice;
use tracing::debug;
/// Extract the `LintStore` from the query context. /// Extract the `LintStore` from the query context.
/// This function exists because we've erased `LintStore` as `dyn Any` in the context. /// This function exists because we've erased `LintStore` as `dyn Any` in the context.

View file

@ -19,8 +19,8 @@ use rustc_target::abi::Abi;
use rustc_target::abi::{Integer, LayoutOf, TagEncoding, VariantIdx, Variants}; use rustc_target::abi::{Integer, LayoutOf, TagEncoding, VariantIdx, Variants};
use rustc_target::spec::abi::Abi as SpecAbi; use rustc_target::spec::abi::Abi as SpecAbi;
use log::debug;
use std::cmp; use std::cmp;
use tracing::debug;
declare_lint! { declare_lint! {
UNUSED_COMPARISONS, UNUSED_COMPARISONS,

View file

@ -17,7 +17,7 @@ use rustc_span::symbol::Symbol;
use rustc_span::symbol::{kw, sym}; use rustc_span::symbol::{kw, sym};
use rustc_span::{BytePos, Span, DUMMY_SP}; use rustc_span::{BytePos, Span, DUMMY_SP};
use log::debug; use tracing::debug;
declare_lint! { declare_lint! {
pub UNUSED_MUST_USE, pub UNUSED_MUST_USE,

View file

@ -12,7 +12,7 @@ doctest = false
[dependencies] [dependencies]
flate2 = "1.0" flate2 = "1.0"
libc = "0.2" libc = "0.2"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
memmap = "0.7" memmap = "0.7"
smallvec = { version = "1.0", features = ["union", "may_dangle"] } smallvec = { version = "1.0", features = ["union", "may_dangle"] }
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }

View file

@ -26,10 +26,10 @@ use rustc_span::symbol::{sym, Symbol};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use rustc_target::spec::{PanicStrategy, TargetTriple}; use rustc_target::spec::{PanicStrategy, TargetTriple};
use log::{debug, info};
use proc_macro::bridge::client::ProcMacro; use proc_macro::bridge::client::ProcMacro;
use std::path::Path; use std::path::Path;
use std::{cmp, env, fs}; use std::{cmp, env, fs};
use tracing::{debug, info};
#[derive(Clone)] #[derive(Clone)]
pub struct CStore { pub struct CStore {

View file

@ -159,11 +159,11 @@ fn calculate_type(tcx: TyCtxt<'_>, ty: CrateType) -> DependencyList {
let name = tcx.crate_name(cnum); let name = tcx.crate_name(cnum);
let src = tcx.used_crate_source(cnum); let src = tcx.used_crate_source(cnum);
if src.dylib.is_some() { if src.dylib.is_some() {
log::info!("adding dylib: {}", name); tracing::info!("adding dylib: {}", name);
add_library(tcx, cnum, RequireDynamic, &mut formats); add_library(tcx, cnum, RequireDynamic, &mut formats);
let deps = tcx.dylib_dependency_formats(cnum); let deps = tcx.dylib_dependency_formats(cnum);
for &(depnum, style) in deps.iter() { for &(depnum, style) in deps.iter() {
log::info!("adding {:?}: {}", style, tcx.crate_name(depnum)); tracing::info!("adding {:?}: {}", style, tcx.crate_name(depnum));
add_library(tcx, depnum, style, &mut formats); add_library(tcx, depnum, style, &mut formats);
} }
} }
@ -191,7 +191,7 @@ fn calculate_type(tcx: TyCtxt<'_>, ty: CrateType) -> DependencyList {
&& tcx.dep_kind(cnum) == CrateDepKind::Explicit && tcx.dep_kind(cnum) == CrateDepKind::Explicit
{ {
assert!(src.rlib.is_some() || src.rmeta.is_some()); assert!(src.rlib.is_some() || src.rmeta.is_some());
log::info!("adding staticlib: {}", tcx.crate_name(cnum)); tracing::info!("adding staticlib: {}", tcx.crate_name(cnum));
add_library(tcx, cnum, RequireStatic, &mut formats); add_library(tcx, cnum, RequireStatic, &mut formats);
ret[cnum.as_usize() - 1] = Linkage::Static; ret[cnum.as_usize() - 1] = Linkage::Static;
} }

View file

@ -230,11 +230,11 @@ use rustc_span::Span;
use rustc_target::spec::{Target, TargetTriple}; use rustc_target::spec::{Target, TargetTriple};
use flate2::read::DeflateDecoder; use flate2::read::DeflateDecoder;
use log::{debug, info, warn};
use std::io::{Read, Result as IoResult, Write}; use std::io::{Read, Result as IoResult, Write};
use std::ops::Deref; use std::ops::Deref;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::{cmp, fmt, fs}; use std::{cmp, fmt, fs};
use tracing::{debug, info, warn};
#[derive(Clone)] #[derive(Clone)]
crate struct CrateLocator<'a> { crate struct CrateLocator<'a> {

View file

@ -37,13 +37,13 @@ use rustc_span::source_map::{respan, Spanned};
use rustc_span::symbol::{sym, Ident, Symbol}; use rustc_span::symbol::{sym, Ident, Symbol};
use rustc_span::{self, hygiene::MacroKind, BytePos, ExpnId, Pos, Span, SyntaxContext, DUMMY_SP}; use rustc_span::{self, hygiene::MacroKind, BytePos, ExpnId, Pos, Span, SyntaxContext, DUMMY_SP};
use log::debug;
use proc_macro::bridge::client::ProcMacro; use proc_macro::bridge::client::ProcMacro;
use std::cell::Cell; use std::cell::Cell;
use std::io; use std::io;
use std::mem; use std::mem;
use std::num::NonZeroUsize; use std::num::NonZeroUsize;
use std::path::Path; use std::path::Path;
use tracing::debug;
pub use cstore_impl::{provide, provide_extern}; pub use cstore_impl::{provide, provide_extern};
use rustc_span::hygiene::HygieneDecodeContext; use rustc_span::hygiene::HygieneDecodeContext;

View file

@ -1,7 +1,6 @@
use crate::rmeta::table::{FixedSizeEncoding, TableBuilder}; use crate::rmeta::table::{FixedSizeEncoding, TableBuilder};
use crate::rmeta::*; use crate::rmeta::*;
use log::{debug, trace};
use rustc_ast::ast; use rustc_ast::ast;
use rustc_data_structures::fingerprint::{Fingerprint, FingerprintEncoder}; use rustc_data_structures::fingerprint::{Fingerprint, FingerprintEncoder};
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexSet}; use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexSet};
@ -37,6 +36,7 @@ use rustc_target::abi::VariantIdx;
use std::hash::Hash; use std::hash::Hash;
use std::num::NonZeroUsize; use std::num::NonZeroUsize;
use std::path::Path; use std::path::Path;
use tracing::{debug, trace};
pub(super) struct EncodeContext<'a, 'tcx> { pub(super) struct EncodeContext<'a, 'tcx> {
opaque: opaque::Encoder, opaque: opaque::Encoder,

View file

@ -1,11 +1,11 @@
use crate::rmeta::*; use crate::rmeta::*;
use log::debug;
use rustc_index::vec::Idx; use rustc_index::vec::Idx;
use rustc_serialize::opaque::Encoder; use rustc_serialize::opaque::Encoder;
use std::convert::TryInto; use std::convert::TryInto;
use std::marker::PhantomData; use std::marker::PhantomData;
use std::num::NonZeroUsize; use std::num::NonZeroUsize;
use tracing::debug;
/// Helper trait, for encoding to, and decoding from, a fixed number of bytes. /// Helper trait, for encoding to, and decoding from, a fixed number of bytes.
/// Used mainly for Lazy positions and lengths. /// Used mainly for Lazy positions and lengths.

View file

@ -12,7 +12,7 @@ doctest = false
[dependencies] [dependencies]
rustc_arena = { path = "../librustc_arena" } rustc_arena = { path = "../librustc_arena" }
bitflags = "1.2.1" bitflags = "1.2.1"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc-rayon-core = "0.3.0" rustc-rayon-core = "0.3.0"
polonius-engine = "0.12.0" polonius-engine = "0.12.0"
rustc_apfloat = { path = "../librustc_apfloat" } rustc_apfloat = { path = "../librustc_apfloat" }

View file

@ -60,7 +60,7 @@ extern crate rustc_macros;
#[macro_use] #[macro_use]
extern crate rustc_data_structures; extern crate rustc_data_structures;
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
#[macro_use] #[macro_use]
extern crate smallvec; extern crate smallvec;

View file

@ -13,7 +13,7 @@ doctest = false
either = "1.5.0" either = "1.5.0"
rustc_graphviz = { path = "../librustc_graphviz" } rustc_graphviz = { path = "../librustc_graphviz" }
itertools = "0.8" itertools = "0.8"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
log_settings = "0.1.1" log_settings = "0.1.1"
polonius-engine = "0.12.0" polonius-engine = "0.12.0"
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }

View file

@ -3,10 +3,10 @@
use std::collections::BTreeMap; use std::collections::BTreeMap;
use log::debug;
use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::fx::FxHashSet;
use rustc_errors::DiagnosticBuilder; use rustc_errors::DiagnosticBuilder;
use rustc_middle::ty::RegionVid; use rustc_middle::ty::RegionVid;
use tracing::debug;
use smallvec::SmallVec; use smallvec::SmallVec;

View file

@ -30,7 +30,7 @@ Rust MIR: a lowered representation of Rust.
#![recursion_limit = "256"] #![recursion_limit = "256"]
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
#[macro_use] #[macro_use]
extern crate rustc_middle; extern crate rustc_middle;

View file

@ -11,7 +11,7 @@ doctest = false
[dependencies] [dependencies]
rustc_arena = { path = "../librustc_arena" } rustc_arena = { path = "../librustc_arena" }
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }
rustc_apfloat = { path = "../librustc_apfloat" } rustc_apfloat = { path = "../librustc_apfloat" }
rustc_attr = { path = "../librustc_attr" } rustc_attr = { path = "../librustc_attr" }

View file

@ -12,7 +12,7 @@
#![recursion_limit = "256"] #![recursion_limit = "256"]
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
#[macro_use] #[macro_use]
extern crate rustc_middle; extern crate rustc_middle;

View file

@ -11,7 +11,7 @@ doctest = false
[dependencies] [dependencies]
bitflags = "1.0" bitflags = "1.0"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_ast_pretty = { path = "../librustc_ast_pretty" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }
rustc_feature = { path = "../librustc_feature" } rustc_feature = { path = "../librustc_feature" }

View file

@ -8,8 +8,8 @@ use rustc_session::parse::ParseSess;
use rustc_span::symbol::{sym, Symbol}; use rustc_span::symbol::{sym, Symbol};
use rustc_span::{BytePos, Pos, Span}; use rustc_span::{BytePos, Pos, Span};
use log::debug;
use std::char; use std::char;
use tracing::debug;
mod tokentrees; mod tokentrees;
mod unescape_error_reporting; mod unescape_error_reporting;

View file

@ -18,7 +18,7 @@ pub(crate) fn emit_unescape_error(
range: Range<usize>, range: Range<usize>,
error: EscapeError, error: EscapeError,
) { ) {
log::debug!( tracing::debug!(
"emit_unescape_error: {:?}, {:?}, {:?}, {:?}, {:?}", "emit_unescape_error: {:?}, {:?}, {:?}, {:?}, {:?}",
lit, lit,
span_with_quotes, span_with_quotes,

View file

@ -20,7 +20,7 @@ use std::mem;
use std::path::Path; use std::path::Path;
use std::str; use std::str;
use log::{debug, info}; use tracing::{debug, info};
pub const MACRO_ARGUMENTS: Option<&'static str> = Some("macro arguments"); pub const MACRO_ARGUMENTS: Option<&'static str> = Some("macro arguments");

View file

@ -6,7 +6,7 @@ use rustc_ast_pretty::pprust;
use rustc_errors::{error_code, PResult}; use rustc_errors::{error_code, PResult};
use rustc_span::Span; use rustc_span::Span;
use log::debug; use tracing::debug;
#[derive(Debug)] #[derive(Debug)]
pub(super) enum InnerAttrPolicy<'a> { pub(super) enum InnerAttrPolicy<'a> {

View file

@ -16,7 +16,7 @@ use rustc_span::source_map::Spanned;
use rustc_span::symbol::{kw, Ident}; use rustc_span::symbol::{kw, Ident};
use rustc_span::{MultiSpan, Span, SpanSnippetError, DUMMY_SP}; use rustc_span::{MultiSpan, Span, SpanSnippetError, DUMMY_SP};
use log::{debug, trace}; use tracing::{debug, trace};
const TURBOFISH: &str = "use `::<...>` instead of `<...>` to specify type arguments"; const TURBOFISH: &str = "use `::<...>` instead of `<...>` to specify type arguments";

View file

@ -4,7 +4,6 @@ use super::{BlockMode, Parser, PathStyle, Restrictions, TokenType};
use super::{SemiColonMode, SeqSep, TokenExpectType}; use super::{SemiColonMode, SeqSep, TokenExpectType};
use crate::maybe_recover_from_interpolated_ty_qpath; use crate::maybe_recover_from_interpolated_ty_qpath;
use log::debug;
use rustc_ast::ast::{self, AttrStyle, AttrVec, CaptureBy, Field, Lit, UnOp, DUMMY_NODE_ID}; use rustc_ast::ast::{self, AttrStyle, AttrVec, CaptureBy, Field, Lit, UnOp, DUMMY_NODE_ID};
use rustc_ast::ast::{AnonConst, BinOp, BinOpKind, FnDecl, FnRetTy, MacCall, Param, Ty, TyKind}; use rustc_ast::ast::{AnonConst, BinOp, BinOpKind, FnDecl, FnRetTy, MacCall, Param, Ty, TyKind};
use rustc_ast::ast::{Arm, Async, BlockCheckMode, Expr, ExprKind, Label, Movability, RangeLimits}; use rustc_ast::ast::{Arm, Async, BlockCheckMode, Expr, ExprKind, Label, Movability, RangeLimits};
@ -18,6 +17,7 @@ use rustc_errors::{Applicability, DiagnosticBuilder, PResult};
use rustc_span::source_map::{self, Span, Spanned}; use rustc_span::source_map::{self, Span, Spanned};
use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::symbol::{kw, sym, Ident, Symbol};
use std::mem; use std::mem;
use tracing::debug;
/// Possibly accepts an `token::Interpolated` expression (a pre-parsed expression /// Possibly accepts an `token::Interpolated` expression (a pre-parsed expression
/// dropped into the token stream, which happens while parsing the result of /// dropped into the token stream, which happens while parsing the result of

View file

@ -20,9 +20,9 @@ use rustc_span::edition::Edition;
use rustc_span::source_map::{self, Span}; use rustc_span::source_map::{self, Span};
use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::symbol::{kw, sym, Ident, Symbol};
use log::debug;
use std::convert::TryFrom; use std::convert::TryFrom;
use std::mem; use std::mem;
use tracing::debug;
impl<'a> Parser<'a> { impl<'a> Parser<'a> {
/// Parses a source module as a crate. This is the main entry point for the parser. /// Parses a source module as a crate. This is the main entry point for the parser.

View file

@ -13,7 +13,6 @@ use crate::lexer::UnmatchedBrace;
use diagnostics::Error; use diagnostics::Error;
pub use path::PathStyle; pub use path::PathStyle;
use log::debug;
use rustc_ast::ast::DUMMY_NODE_ID; use rustc_ast::ast::DUMMY_NODE_ID;
use rustc_ast::ast::{self, AttrStyle, AttrVec, Const, CrateSugar, Extern, Unsafe}; use rustc_ast::ast::{self, AttrStyle, AttrVec, Const, CrateSugar, Extern, Unsafe};
use rustc_ast::ast::{ use rustc_ast::ast::{
@ -27,6 +26,7 @@ use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder, FatalError
use rustc_session::parse::ParseSess; use rustc_session::parse::ParseSess;
use rustc_span::source_map::{respan, Span, DUMMY_SP}; use rustc_span::source_map::{respan, Span, DUMMY_SP};
use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::symbol::{kw, sym, Ident, Symbol};
use tracing::debug;
use std::{cmp, mem, slice}; use std::{cmp, mem, slice};

View file

@ -10,8 +10,8 @@ use rustc_errors::{pluralize, Applicability, PResult};
use rustc_span::source_map::{BytePos, Span}; use rustc_span::source_map::{BytePos, Span};
use rustc_span::symbol::{kw, sym, Ident}; use rustc_span::symbol::{kw, sym, Ident};
use log::debug;
use std::mem; use std::mem;
use tracing::debug;
/// Specifies how to parse a path. /// Specifies how to parse a path.
#[derive(Copy, Clone, PartialEq)] #[derive(Copy, Clone, PartialEq)]

View file

@ -9,7 +9,7 @@ name = "rustc_passes"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }
rustc_attr = { path = "../librustc_attr" } rustc_attr = { path = "../librustc_attr" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }

View file

@ -13,7 +13,7 @@
#[macro_use] #[macro_use]
extern crate rustc_middle; extern crate rustc_middle;
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
use rustc_middle::ty::query::Providers; use rustc_middle::ty::query::Providers;

View file

@ -17,4 +17,4 @@ rustc_typeck = { path = "../librustc_typeck" }
rustc_session = { path = "../librustc_session" } rustc_session = { path = "../librustc_session" }
rustc_span = { path = "../librustc_span" } rustc_span = { path = "../librustc_span" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }
log = { package = "tracing", version = "0.1" } tracing = "0.1"

View file

@ -1853,7 +1853,7 @@ impl SearchInterfaceForPrivateItemsVisitor<'tcx> {
let ret = self.required_visibility == ty::Visibility::Public let ret = self.required_visibility == ty::Visibility::Public
&& self.tcx.is_private_dep(item_id.krate); && self.tcx.is_private_dep(item_id.krate);
log::debug!("leaks_private_dep(item_id={:?})={}", item_id, ret); tracing::debug!("leaks_private_dep(item_id={:?})={}", item_id, ret);
ret ret
} }
} }

View file

@ -11,7 +11,7 @@ doctest = false
[dependencies] [dependencies]
rustc_arena = { path = "../librustc_arena" } rustc_arena = { path = "../librustc_arena" }
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc-rayon-core = "0.3.0" rustc-rayon-core = "0.3.0"
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }
rustc_errors = { path = "../librustc_errors" } rustc_errors = { path = "../librustc_errors" }

View file

@ -7,7 +7,7 @@
#![feature(stmt_expr_attributes)] #![feature(stmt_expr_attributes)]
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
#[macro_use] #[macro_use]
extern crate rustc_data_structures; extern crate rustc_data_structures;
#[macro_use] #[macro_use]

View file

@ -12,7 +12,7 @@ doctest = false
[dependencies] [dependencies]
bitflags = "1.2.1" bitflags = "1.2.1"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_ast = { path = "../librustc_ast" } rustc_ast = { path = "../librustc_ast" }
rustc_arena = { path = "../librustc_arena" } rustc_arena = { path = "../librustc_arena" }
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }

View file

@ -37,9 +37,9 @@ use rustc_span::source_map::{respan, Spanned};
use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::Span; use rustc_span::Span;
use log::debug;
use std::cell::Cell; use std::cell::Cell;
use std::ptr; use std::ptr;
use tracing::debug;
type Res = def::Res<NodeId>; type Res = def::Res<NodeId>;

View file

@ -1,5 +1,4 @@
use crate::Resolver; use crate::Resolver;
use log::debug;
use rustc_ast::ast::*; use rustc_ast::ast::*;
use rustc_ast::token::{self, Token}; use rustc_ast::token::{self, Token};
use rustc_ast::visit::{self, FnKind}; use rustc_ast::visit::{self, FnKind};
@ -11,6 +10,7 @@ use rustc_hir::definitions::*;
use rustc_span::hygiene::ExpnId; use rustc_span::hygiene::ExpnId;
use rustc_span::symbol::{kw, sym}; use rustc_span::symbol::{kw, sym};
use rustc_span::Span; use rustc_span::Span;
use tracing::debug;
crate fn collect_definitions( crate fn collect_definitions(
resolver: &mut Resolver<'_>, resolver: &mut Resolver<'_>,

View file

@ -1,7 +1,6 @@
use std::cmp::Reverse; use std::cmp::Reverse;
use std::ptr; use std::ptr;
use log::debug;
use rustc_ast::ast::{self, Path}; use rustc_ast::ast::{self, Path};
use rustc_ast::util::lev_distance::find_best_match_for_name; use rustc_ast::util::lev_distance::find_best_match_for_name;
use rustc_ast_pretty::pprust; use rustc_ast_pretty::pprust;
@ -18,6 +17,7 @@ use rustc_span::hygiene::MacroKind;
use rustc_span::source_map::SourceMap; use rustc_span::source_map::SourceMap;
use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::{BytePos, MultiSpan, Span}; use rustc_span::{BytePos, MultiSpan, Span};
use tracing::debug;
use crate::imports::{Import, ImportKind, ImportResolver}; use crate::imports::{Import, ImportKind, ImportResolver};
use crate::path_names_to_string; use crate::path_names_to_string;

View file

@ -28,7 +28,7 @@ use rustc_span::hygiene::ExpnId;
use rustc_span::symbol::{kw, Ident, Symbol}; use rustc_span::symbol::{kw, Ident, Symbol};
use rustc_span::{MultiSpan, Span}; use rustc_span::{MultiSpan, Span};
use log::*; use tracing::*;
use std::cell::Cell; use std::cell::Cell;
use std::{mem, ptr}; use std::{mem, ptr};

View file

@ -29,10 +29,10 @@ use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::Span; use rustc_span::Span;
use smallvec::{smallvec, SmallVec}; use smallvec::{smallvec, SmallVec};
use log::debug;
use rustc_span::source_map::{respan, Spanned}; use rustc_span::source_map::{respan, Spanned};
use std::collections::BTreeSet; use std::collections::BTreeSet;
use std::mem::{replace, take}; use std::mem::{replace, take};
use tracing::debug;
mod diagnostics; mod diagnostics;
crate mod lifetimes; crate mod lifetimes;
@ -1732,7 +1732,12 @@ impl<'a, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
source: PathSource<'ast>, source: PathSource<'ast>,
crate_lint: CrateLint, crate_lint: CrateLint,
) -> PartialRes { ) -> PartialRes {
log::debug!("smart_resolve_path_fragment(id={:?},qself={:?},path={:?}", id, qself, path); tracing::debug!(
"smart_resolve_path_fragment(id={:?},qself={:?},path={:?}",
id,
qself,
path
);
let ns = source.namespace(); let ns = source.namespace();
let is_expected = &|res| source.is_expected(res); let is_expected = &|res| source.is_expected(res);

View file

@ -20,7 +20,7 @@ use rustc_span::hygiene::MacroKind;
use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::{BytePos, Span, DUMMY_SP}; use rustc_span::{BytePos, Span, DUMMY_SP};
use log::debug; use tracing::debug;
type Res = def::Res<ast::NodeId>; type Res = def::Res<ast::NodeId>;

View file

@ -26,7 +26,7 @@ use std::borrow::Cow;
use std::cell::Cell; use std::cell::Cell;
use std::mem::take; use std::mem::take;
use log::debug; use tracing::debug;
// This counts the no of times a lifetime is used // This counts the no of times a lifetime is used
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug)]

View file

@ -54,10 +54,10 @@ use rustc_span::source_map::Spanned;
use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use log::debug;
use std::cell::{Cell, RefCell}; use std::cell::{Cell, RefCell};
use std::collections::BTreeSet; use std::collections::BTreeSet;
use std::{cmp, fmt, iter, ptr}; use std::{cmp, fmt, iter, ptr};
use tracing::debug;
use diagnostics::{extend_span_to_previous_binding, find_span_of_binding_until_next_binding}; use diagnostics::{extend_span_to_previous_binding, find_span_of_binding_until_next_binding};
use diagnostics::{ImportSuggestion, LabelSuggestion, Suggestion}; use diagnostics::{ImportSuggestion, LabelSuggestion, Suggestion};

View file

@ -9,7 +9,7 @@ name = "rustc_save_analysis"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }
rustc_ast = { path = "../librustc_ast" } rustc_ast = { path = "../librustc_ast" }
rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_ast_pretty = { path = "../librustc_ast_pretty" }

View file

@ -45,7 +45,7 @@ use rls_data::{
RefKind, Relation, RelationKind, SpanData, RefKind, Relation, RelationKind, SpanData,
}; };
use log::{debug, error}; use tracing::{debug, error};
macro_rules! down_cast_data { macro_rules! down_cast_data {
($id:ident, $kind:ident, $sp:expr) => { ($id:ident, $kind:ident, $sp:expr) => {

View file

@ -45,7 +45,7 @@ use rls_data::{
RefKind, Relation, RelationKind, SpanData, RefKind, Relation, RelationKind, SpanData,
}; };
use log::{debug, error, info}; use tracing::{debug, error, info};
pub struct SaveContext<'tcx> { pub struct SaveContext<'tcx> {
tcx: TyCtxt<'tcx>, tcx: TyCtxt<'tcx>,

View file

@ -11,8 +11,8 @@ path = "lib.rs"
[dependencies] [dependencies]
bitflags = "1.2.1" bitflags = "1.2.1"
getopts = "0.2" getopts = "0.2"
log = { package = "tracing", version = "0.1" }
rustc_macros = { path = "../librustc_macros" } rustc_macros = { path = "../librustc_macros" }
tracing = "0.1"
rustc_errors = { path = "../librustc_errors" } rustc_errors = { path = "../librustc_errors" }
rustc_feature = { path = "../librustc_feature" } rustc_feature = { path = "../librustc_feature" }
rustc_target = { path = "../librustc_target" } rustc_target = { path = "../librustc_target" }

View file

@ -2,10 +2,10 @@
//! compilation. This is used for incremental compilation tests and debug //! compilation. This is used for incremental compilation tests and debug
//! output. //! output.
use log::debug;
use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::fx::FxHashMap;
use rustc_span::{Span, Symbol}; use rustc_span::{Span, Symbol};
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use tracing::debug;
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd)] #[derive(Copy, Clone, Debug, PartialEq, PartialOrd)]
pub enum CguReuse { pub enum CguReuse {

View file

@ -1878,7 +1878,7 @@ fn parse_pretty(
} }
} }
}; };
log::debug!("got unpretty option: {:?}", first); tracing::debug!("got unpretty option: {:?}", first);
first first
} }
} }

View file

@ -8,8 +8,8 @@ use std::fs;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use crate::search_paths::{PathKind, SearchPath, SearchPathFile}; use crate::search_paths::{PathKind, SearchPath, SearchPathFile};
use log::debug;
use rustc_fs_util::fix_windows_verbatim_for_gcc; use rustc_fs_util::fix_windows_verbatim_for_gcc;
use tracing::debug;
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub enum FileMatch { pub enum FileMatch {

View file

@ -18,6 +18,6 @@ rustc_arena = { path = "../librustc_arena" }
scoped-tls = "1.0" scoped-tls = "1.0"
unicode-width = "0.1.4" unicode-width = "0.1.4"
cfg-if = "0.1.2" cfg-if = "0.1.2"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
sha-1 = "0.8" sha-1 = "0.8"
md-5 = "0.8" md-5 = "0.8"

View file

@ -30,12 +30,12 @@ use crate::SESSION_GLOBALS;
use crate::{Span, DUMMY_SP}; use crate::{Span, DUMMY_SP};
use crate::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE}; use crate::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
use log::*;
use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::sync::{Lock, Lrc}; use rustc_data_structures::sync::{Lock, Lrc};
use rustc_macros::HashStable_Generic; use rustc_macros::HashStable_Generic;
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder}; use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
use std::fmt; use std::fmt;
use tracing::*;
/// A `SyntaxContext` represents a chain of pairs `(ExpnId, Transparency)` named "marks". /// A `SyntaxContext` represents a chain of pairs `(ExpnId, Transparency)` named "marks".
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]

View file

@ -19,9 +19,9 @@ use std::hash::Hash;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::sync::atomic::Ordering; use std::sync::atomic::Ordering;
use log::debug;
use std::fs; use std::fs;
use std::io; use std::io;
use tracing::debug;
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;

View file

@ -10,7 +10,7 @@ path = "lib.rs"
doctest = false doctest = false
[dependencies] [dependencies]
log = { package = "tracing", version = "0.1" } tracing = "0.1"
punycode = "0.4.0" punycode = "0.4.0"
rustc-demangle = "0.1.16" rustc-demangle = "0.1.16"

View file

@ -8,7 +8,7 @@ use rustc_middle::ty::subst::{GenericArg, GenericArgKind};
use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypeFoldable}; use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypeFoldable};
use rustc_middle::util::common::record_time; use rustc_middle::util::common::record_time;
use log::debug; use tracing::debug;
use std::fmt::{self, Write}; use std::fmt::{self, Write};
use std::mem::{self, discriminant}; use std::mem::{self, discriminant};

View file

@ -106,7 +106,7 @@ use rustc_middle::ty::subst::SubstsRef;
use rustc_middle::ty::{self, Instance, TyCtxt}; use rustc_middle::ty::{self, Instance, TyCtxt};
use rustc_session::config::SymbolManglingVersion; use rustc_session::config::SymbolManglingVersion;
use log::debug; use tracing::debug;
mod legacy; mod legacy;
mod v0; mod v0;

View file

@ -10,7 +10,7 @@ path = "lib.rs"
[dependencies] [dependencies]
bitflags = "1.2.1" bitflags = "1.2.1"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }
rustc_macros = { path = "../librustc_macros" } rustc_macros = { path = "../librustc_macros" }
rustc_serialize = { path = "../librustc_serialize" } rustc_serialize = { path = "../librustc_serialize" }

View file

@ -20,7 +20,7 @@
extern crate rustc_macros; extern crate rustc_macros;
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
pub mod abi; pub mod abi;
pub mod asm; pub mod asm;

View file

@ -11,7 +11,7 @@ doctest = false
[dependencies] [dependencies]
rustc_parse_format = { path = "../librustc_parse_format" } rustc_parse_format = { path = "../librustc_parse_format" }
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_attr = { path = "../librustc_attr" } rustc_attr = { path = "../librustc_attr" }
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }
rustc_ast = { path = "../librustc_ast" } rustc_ast = { path = "../librustc_ast" }

View file

@ -24,7 +24,7 @@ extern crate rustc_macros;
#[macro_use] #[macro_use]
extern crate rustc_data_structures; extern crate rustc_data_structures;
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
#[macro_use] #[macro_use]
extern crate rustc_middle; extern crate rustc_middle;

View file

@ -9,7 +9,7 @@ name = "rustc_traits"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }
rustc_hir = { path = "../librustc_hir" } rustc_hir = { path = "../librustc_hir" }

View file

@ -8,7 +8,7 @@
#![recursion_limit = "256"] #![recursion_limit = "256"]
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
#[macro_use] #[macro_use]
extern crate rustc_middle; extern crate rustc_middle;

View file

@ -9,7 +9,7 @@ name = "rustc_ty"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }
rustc_errors = { path = "../librustc_errors" } rustc_errors = { path = "../librustc_errors" }

View file

@ -8,7 +8,7 @@ use rustc_target::spec::abi::Abi;
use rustc_trait_selection::traits; use rustc_trait_selection::traits;
use traits::{translate_substs, Reveal}; use traits::{translate_substs, Reveal};
use log::debug; use tracing::debug;
fn resolve_instance<'tcx>( fn resolve_instance<'tcx>(
tcx: TyCtxt<'tcx>, tcx: TyCtxt<'tcx>,

View file

@ -12,7 +12,7 @@
#[macro_use] #[macro_use]
extern crate rustc_middle; extern crate rustc_middle;
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
use rustc_middle::ty::query::Providers; use rustc_middle::ty::query::Providers;

View file

@ -12,7 +12,7 @@ doctest = false
[dependencies] [dependencies]
rustc_arena = { path = "../librustc_arena" } rustc_arena = { path = "../librustc_arena" }
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }
rustc_attr = { path = "../librustc_attr" } rustc_attr = { path = "../librustc_attr" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }

View file

@ -69,7 +69,7 @@ This API is completely unstable and subject to change.
#![recursion_limit = "256"] #![recursion_limit = "256"]
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
#[macro_use] #[macro_use]
extern crate rustc_middle; extern crate rustc_middle;

View file

@ -8,7 +8,7 @@ edition = "2018"
diff = "0.1.10" diff = "0.1.10"
env_logger = { version = "0.7", default-features = false } env_logger = { version = "0.7", default-features = false }
getopts = "0.2" getopts = "0.2"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
regex = "1.0" regex = "1.0"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"

View file

@ -8,8 +8,8 @@ use std::path::Path;
use std::str::FromStr; use std::str::FromStr;
use lazy_static::lazy_static; use lazy_static::lazy_static;
use log::*;
use regex::Regex; use regex::Regex;
use tracing::*;
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, PartialEq)]
pub enum ErrorKind { pub enum ErrorKind {

View file

@ -5,7 +5,7 @@ use std::io::prelude::*;
use std::io::BufReader; use std::io::BufReader;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use log::*; use tracing::*;
use crate::common::{CompareMode, Config, Debugger, FailMode, Mode, PassMode}; use crate::common::{CompareMode, Config, Debugger, FailMode, Mode, PassMode};
use crate::extract_gdb_version; use crate::extract_gdb_version;

View file

@ -9,7 +9,6 @@ use crate::common::{expected_output_path, output_base_dir, output_relative_path,
use crate::common::{CompareMode, Config, Debugger, Mode, PassMode, Pretty, TestPaths}; use crate::common::{CompareMode, Config, Debugger, Mode, PassMode, Pretty, TestPaths};
use crate::util::logv; use crate::util::logv;
use getopts::Options; use getopts::Options;
use log::*;
use std::env; use std::env;
use std::ffi::OsString; use std::ffi::OsString;
use std::fs; use std::fs;
@ -18,6 +17,7 @@ use std::path::{Path, PathBuf};
use std::process::Command; use std::process::Command;
use std::time::SystemTime; use std::time::SystemTime;
use test::ColorConfig; use test::ColorConfig;
use tracing::*;
use walkdir::WalkDir; use walkdir::WalkDir;
use self::header::EarlyProps; use self::header::EarlyProps;

View file

@ -30,7 +30,7 @@ use std::str;
use glob::glob; use glob::glob;
use lazy_static::lazy_static; use lazy_static::lazy_static;
use log::*; use tracing::*;
use crate::extract_gdb_version; use crate::extract_gdb_version;
use crate::is_android_gdb_target; use crate::is_android_gdb_target;

View file

@ -3,7 +3,7 @@ use std::env;
use std::ffi::OsStr; use std::ffi::OsStr;
use std::path::PathBuf; use std::path::PathBuf;
use log::*; use tracing::*;
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;