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]
rustc_serialize = { path = "../librustc_serialize" }
log = { package = "tracing", version = "0.1" }
tracing = "0.1"
rustc_span = { path = "../librustc_span" }
rustc_data_structures = { path = "../librustc_data_structures" }
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::Span;
use log::debug;
use std::ascii;
use tracing::debug;
pub enum LitError {
NotLiteral,

View File

@ -12,7 +12,7 @@ crate-type = ["dylib"]
[dependencies]
lazy_static = "1.0"
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"] }
rustc_middle = { path = "../librustc_middle" }
rustc_ast_pretty = { path = "../librustc_ast_pretty" }

View File

@ -9,7 +9,7 @@
#![recursion_limit = "256"]
#[macro_use]
extern crate log;
extern crate tracing;
#[macro_use]
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
/// log crate version.
/// tracing crate version.
pub fn init_rustc_env_logger() {
init_env_logger("RUSTC_LOG")
}
/// 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`.
pub fn init_env_logger(env: &str) {
// Don't register a dispatcher if there's no filter to print anything

View File

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

View File

@ -1,11 +1,11 @@
use crate::{Applicability, Handler, Level, StashKey};
use crate::{Diagnostic, DiagnosticId, DiagnosticStyledString};
use log::debug;
use rustc_span::{MultiSpan, Span};
use std::fmt::{self, Debug};
use std::ops::{Deref, DerefMut};
use std::thread::panicking;
use tracing::debug;
/// 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,
};
use log::*;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::sync::Lrc;
use rustc_span::hygiene::{ExpnKind, MacroKind};
@ -30,6 +29,7 @@ use std::iter;
use std::path::Path;
use termcolor::{Ansi, BufferWriter, ColorChoice, ColorSpec, StandardStream};
use termcolor::{Buffer, Color, WriteColor};
use tracing::*;
/// Default column width, used in tests and when terminal dimensions cannot be determined.
const DEFAULT_COLUMN_WIDTH: usize = 140;

View File

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

View File

@ -12,7 +12,7 @@ doctest = false
[dependencies]
rustc_serialize = { path = "../librustc_serialize" }
log = { package = "tracing", version = "0.1" }
tracing = "0.1"
rustc_span = { path = "../librustc_span" }
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
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::Span;
use log::debug;
use std::borrow::Cow;
use std::collections::hash_map::Entry;
use std::{mem, slice};
use tracing::debug;
crate struct ParserAnyMacro<'a> {
parser: Parser<'a>,

View File

@ -18,5 +18,5 @@ rustc_span = { path = "../librustc_span" }
rustc_serialize = { path = "../librustc_serialize" }
rustc_ast = { path = "../librustc_ast" }
lazy_static = "1"
log = { package = "tracing", version = "0.1" }
tracing = "0.1"
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::symbol::{sym, Symbol};
use log::debug;
use std::fmt::Write;
use std::hash::Hash;
use tracing::debug;
/// The `DefPathTable` maps `DefIndex`es to `DefKey`s and vice versa.
/// Internally the `DefPathTable` holds a tree of `DefKey`s, where each `DefKey`

View File

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

View File

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

View File

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

View File

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

View File

@ -11,7 +11,7 @@ doctest = false
[dependencies]
libc = "0.2"
log = { package = "tracing", version = "0.1" }
tracing = "0.1"
rayon = { version = "0.3.0", package = "rustc-rayon" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
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 {
log::trace!("run_compiler");
tracing::trace!("run_compiler");
let stderr = config.stderr.take();
util::setup_callbacks_and_run_in_thread_pool_with_globals(
config.opts.edition,

View File

@ -2,7 +2,6 @@ use crate::interface::{Compiler, Result};
use crate::proc_macro_decls;
use crate::util;
use log::{info, warn};
use once_cell::sync::Lazy;
use rustc_ast::mut_visit::MutVisitor;
use rustc_ast::{self, ast, visit};
@ -39,6 +38,7 @@ use rustc_span::symbol::Symbol;
use rustc_span::{FileName, RealFileName};
use rustc_trait_selection::traits;
use rustc_typeck as typeck;
use tracing::{info, warn};
use rustc_serialize::json;
use tempfile::Builder as TempFileBuilder;
@ -104,7 +104,7 @@ pub fn configure_and_expand(
krate: ast::Crate,
crate_name: &str,
) -> 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
// 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
@ -229,7 +229,7 @@ fn configure_and_expand_inner<'a>(
resolver_arenas: &'a ResolverArenas<'a>,
metadata_loader: &'a MetadataLoaderDyn,
) -> Result<(ast::Crate, Resolver<'a>)> {
log::trace!("configure_and_expand_inner");
tracing::trace!("configure_and_expand_inner");
pre_expansion_lint(sess, lint_store, &krate);
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 {
log::debug!("replacing bodies with loop {{}}");
tracing::debug!("replacing bodies with loop {{}}");
util::ReplaceBodyWithLoop::new(&mut resolver).visit_crate(&mut krate);
}

View File

@ -168,7 +168,7 @@ impl<'tcx> Queries<'tcx> {
pub fn expansion(
&self,
) -> Result<&Query<(ast::Crate, Steal<Rc<RefCell<BoxedResolver>>>, Lrc<LintStore>)>> {
log::trace!("expansion");
tracing::trace!("expansion");
self.expansion.compute(|| {
let crate_name = self.crate_name()?.peek().clone();
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::mut_visit::{visit_clobber, MutVisitor, *};
use rustc_ast::ptr::P;
@ -33,6 +32,7 @@ use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex, Once};
#[cfg(not(parallel_compiler))]
use std::{panic, thread};
use tracing::info;
/// Adds `target_feature = "..."` cfgs for a variety of platform
/// specific features (SSE, NEON etc.).

View File

@ -9,7 +9,7 @@ name = "rustc_lint"
path = "lib.rs"
[dependencies]
log = { package = "tracing", version = "0.1" }
tracing = "0.1"
unicode-security = "0.0.5"
rustc_middle = { path = "../librustc_middle" }
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 log::{debug, trace};
use std::fmt::Write;
use tracing::{debug, trace};
// hardwired lints from librustc_middle
pub use rustc_session::lint::builtin::*;

View File

@ -23,8 +23,8 @@ use rustc_session::Session;
use rustc_span::symbol::Ident;
use rustc_span::Span;
use log::debug;
use std::slice;
use tracing::debug;
macro_rules! run_early_pass { ($cx:expr, $f:ident, $($args:expr),*) => ({
$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::Span;
use log::debug;
use std::any::Any;
use std::cell::Cell;
use std::slice;
use tracing::debug;
/// Extract the `LintStore` from the query 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::spec::abi::Abi as SpecAbi;
use log::debug;
use std::cmp;
use tracing::debug;
declare_lint! {
UNUSED_COMPARISONS,

View File

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

View File

@ -12,7 +12,7 @@ doctest = false
[dependencies]
flate2 = "1.0"
libc = "0.2"
log = { package = "tracing", version = "0.1" }
tracing = "0.1"
memmap = "0.7"
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
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_target::spec::{PanicStrategy, TargetTriple};
use log::{debug, info};
use proc_macro::bridge::client::ProcMacro;
use std::path::Path;
use std::{cmp, env, fs};
use tracing::{debug, info};
#[derive(Clone)]
pub struct CStore {

View File

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

View File

@ -230,11 +230,11 @@ use rustc_span::Span;
use rustc_target::spec::{Target, TargetTriple};
use flate2::read::DeflateDecoder;
use log::{debug, info, warn};
use std::io::{Read, Result as IoResult, Write};
use std::ops::Deref;
use std::path::{Path, PathBuf};
use std::{cmp, fmt, fs};
use tracing::{debug, info, warn};
#[derive(Clone)]
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::{self, hygiene::MacroKind, BytePos, ExpnId, Pos, Span, SyntaxContext, DUMMY_SP};
use log::debug;
use proc_macro::bridge::client::ProcMacro;
use std::cell::Cell;
use std::io;
use std::mem;
use std::num::NonZeroUsize;
use std::path::Path;
use tracing::debug;
pub use cstore_impl::{provide, provide_extern};
use rustc_span::hygiene::HygieneDecodeContext;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -11,7 +11,7 @@ doctest = false
[dependencies]
bitflags = "1.0"
log = { package = "tracing", version = "0.1" }
tracing = "0.1"
rustc_ast_pretty = { path = "../librustc_ast_pretty" }
rustc_data_structures = { path = "../librustc_data_structures" }
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::{BytePos, Pos, Span};
use log::debug;
use std::char;
use tracing::debug;
mod tokentrees;
mod unescape_error_reporting;

View File

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

View File

@ -20,7 +20,7 @@ use std::mem;
use std::path::Path;
use std::str;
use log::{debug, info};
use tracing::{debug, info};
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_span::Span;
use log::debug;
use tracing::debug;
#[derive(Debug)]
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::{MultiSpan, Span, SpanSnippetError, DUMMY_SP};
use log::{debug, trace};
use tracing::{debug, trace};
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 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::{AnonConst, BinOp, BinOpKind, FnDecl, FnRetTy, MacCall, Param, Ty, TyKind};
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::symbol::{kw, sym, Ident, Symbol};
use std::mem;
use tracing::debug;
/// Possibly accepts an `token::Interpolated` expression (a pre-parsed expression
/// 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::symbol::{kw, sym, Ident, Symbol};
use log::debug;
use std::convert::TryFrom;
use std::mem;
use tracing::debug;
impl<'a> Parser<'a> {
/// 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;
pub use path::PathStyle;
use log::debug;
use rustc_ast::ast::DUMMY_NODE_ID;
use rustc_ast::ast::{self, AttrStyle, AttrVec, Const, CrateSugar, Extern, Unsafe};
use rustc_ast::ast::{
@ -27,6 +26,7 @@ use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder, FatalError
use rustc_session::parse::ParseSess;
use rustc_span::source_map::{respan, Span, DUMMY_SP};
use rustc_span::symbol::{kw, sym, Ident, Symbol};
use tracing::debug;
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::symbol::{kw, sym, Ident};
use log::debug;
use std::mem;
use tracing::debug;
/// Specifies how to parse a path.
#[derive(Copy, Clone, PartialEq)]

View File

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

View File

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

View File

@ -17,4 +17,4 @@ rustc_typeck = { path = "../librustc_typeck" }
rustc_session = { path = "../librustc_session" }
rustc_span = { path = "../librustc_span" }
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
&& 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
}
}

View File

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

View File

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

View File

@ -12,7 +12,7 @@ doctest = false
[dependencies]
bitflags = "1.2.1"
log = { package = "tracing", version = "0.1" }
tracing = "0.1"
rustc_ast = { path = "../librustc_ast" }
rustc_arena = { path = "../librustc_arena" }
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::Span;
use log::debug;
use std::cell::Cell;
use std::ptr;
use tracing::debug;
type Res = def::Res<NodeId>;

View File

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

View File

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

View File

@ -29,10 +29,10 @@ use rustc_span::symbol::{kw, sym, Ident, Symbol};
use rustc_span::Span;
use smallvec::{smallvec, SmallVec};
use log::debug;
use rustc_span::source_map::{respan, Spanned};
use std::collections::BTreeSet;
use std::mem::{replace, take};
use tracing::debug;
mod diagnostics;
crate mod lifetimes;
@ -1732,7 +1732,12 @@ impl<'a, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
source: PathSource<'ast>,
crate_lint: CrateLint,
) -> 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 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::{BytePos, Span, DUMMY_SP};
use log::debug;
use tracing::debug;
type Res = def::Res<ast::NodeId>;

View File

@ -26,7 +26,7 @@ use std::borrow::Cow;
use std::cell::Cell;
use std::mem::take;
use log::debug;
use tracing::debug;
// This counts the no of times a lifetime is used
#[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::{Span, DUMMY_SP};
use log::debug;
use std::cell::{Cell, RefCell};
use std::collections::BTreeSet;
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::{ImportSuggestion, LabelSuggestion, Suggestion};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -30,12 +30,12 @@ use crate::SESSION_GLOBALS;
use crate::{Span, DUMMY_SP};
use crate::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
use log::*;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::sync::{Lock, Lrc};
use rustc_macros::HashStable_Generic;
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
use std::fmt;
use tracing::*;
/// A `SyntaxContext` represents a chain of pairs `(ExpnId, Transparency)` named "marks".
#[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::sync::atomic::Ordering;
use log::debug;
use std::fs;
use std::io;
use tracing::debug;
#[cfg(test)]
mod tests;

View File

@ -10,7 +10,7 @@ path = "lib.rs"
doctest = false
[dependencies]
log = { package = "tracing", version = "0.1" }
tracing = "0.1"
punycode = "0.4.0"
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::util::common::record_time;
use log::debug;
use tracing::debug;
use std::fmt::{self, Write};
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_session::config::SymbolManglingVersion;
use log::debug;
use tracing::debug;
mod legacy;
mod v0;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@ doctest = false
[dependencies]
rustc_arena = { path = "../librustc_arena" }
log = { package = "tracing", version = "0.1" }
tracing = "0.1"
rustc_middle = { path = "../librustc_middle" }
rustc_attr = { path = "../librustc_attr" }
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"]
#[macro_use]
extern crate log;
extern crate tracing;
#[macro_use]
extern crate rustc_middle;

View File

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

View File

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

View File

@ -5,7 +5,7 @@ use std::io::prelude::*;
use std::io::BufReader;
use std::path::{Path, PathBuf};
use log::*;
use tracing::*;
use crate::common::{CompareMode, Config, Debugger, FailMode, Mode, PassMode};
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::util::logv;
use getopts::Options;
use log::*;
use std::env;
use std::ffi::OsString;
use std::fs;
@ -18,6 +17,7 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use std::time::SystemTime;
use test::ColorConfig;
use tracing::*;
use walkdir::WalkDir;
use self::header::EarlyProps;

View File

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

View File

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