From 980edf5baa0c6563c75aa95332a12c77e68dd29e Mon Sep 17 00:00:00 2001 From: bishtpawan Date: Sun, 2 Aug 2020 12:21:39 +0530 Subject: [PATCH 1/2] Replace from log to tracing in libsrustrustc_ast_lowering, librustc_ast_passes, librustc_ast_pretty --- src/librustc_ast_lowering/Cargo.toml | 2 +- src/librustc_ast_lowering/item.rs | 2 +- src/librustc_ast_lowering/lib.rs | 2 +- src/librustc_ast_lowering/path.rs | 2 +- src/librustc_ast_passes/Cargo.toml | 2 +- src/librustc_ast_passes/feature_gate.rs | 2 +- src/librustc_ast_pretty/Cargo.toml | 2 +- src/librustc_ast_pretty/pp.rs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/librustc_ast_lowering/Cargo.toml b/src/librustc_ast_lowering/Cargo.toml index 51f34a1b78e97..bf7e69a31abcb 100644 --- a/src/librustc_ast_lowering/Cargo.toml +++ b/src/librustc_ast_lowering/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] rustc_arena = { path = "../librustc_arena" } -log = { package = "tracing", version = "0.1" } +tracing = "0.1" rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_hir = { path = "../librustc_hir" } rustc_target = { path = "../librustc_target" } diff --git a/src/librustc_ast_lowering/item.rs b/src/librustc_ast_lowering/item.rs index dd5e658102fac..3e8565091e58c 100644 --- a/src/librustc_ast_lowering/item.rs +++ b/src/librustc_ast_lowering/item.rs @@ -17,7 +17,7 @@ use rustc_span::symbol::{kw, sym, Ident}; use rustc_span::Span; use rustc_target::spec::abi; -use log::debug; +use tracing::debug; use smallvec::{smallvec, SmallVec}; use std::collections::BTreeSet; diff --git a/src/librustc_ast_lowering/lib.rs b/src/librustc_ast_lowering/lib.rs index 1c70eef3bf5e3..da36bd8581329 100644 --- a/src/librustc_ast_lowering/lib.rs +++ b/src/librustc_ast_lowering/lib.rs @@ -64,7 +64,7 @@ use rustc_span::source_map::{respan, DesugaringKind, ExpnData, ExpnKind}; use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::Span; -use log::{debug, trace}; +use tracing::{debug, trace}; use smallvec::{smallvec, SmallVec}; use std::collections::BTreeMap; use std::mem; diff --git a/src/librustc_ast_lowering/path.rs b/src/librustc_ast_lowering/path.rs index e5ce51f8d2d1f..0e13ee7ed3933 100644 --- a/src/librustc_ast_lowering/path.rs +++ b/src/librustc_ast_lowering/path.rs @@ -12,7 +12,7 @@ use rustc_session::lint::BuiltinLintDiagnostics; use rustc_span::symbol::Ident; use rustc_span::Span; -use log::debug; +use tracing::debug; use smallvec::smallvec; impl<'a, 'hir> LoweringContext<'a, 'hir> { diff --git a/src/librustc_ast_passes/Cargo.toml b/src/librustc_ast_passes/Cargo.toml index c53089a4afc5c..6db9bce3164bb 100644 --- a/src/librustc_ast_passes/Cargo.toml +++ b/src/librustc_ast_passes/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" [dependencies] itertools = "0.8" -log = { package = "tracing", version = "0.1" } +tracing = "0.1" rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_attr = { path = "../librustc_attr" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/librustc_ast_passes/feature_gate.rs b/src/librustc_ast_passes/feature_gate.rs index b424c8afb3471..2fe208c3ce68c 100644 --- a/src/librustc_ast_passes/feature_gate.rs +++ b/src/librustc_ast_passes/feature_gate.rs @@ -10,7 +10,7 @@ use rustc_span::source_map::Spanned; use rustc_span::symbol::{sym, Symbol}; use rustc_span::Span; -use log::debug; +use tracing::debug; macro_rules! gate_feature_fn { ($cx: expr, $has_feature: expr, $span: expr, $name: expr, $explain: expr) => {{ diff --git a/src/librustc_ast_pretty/Cargo.toml b/src/librustc_ast_pretty/Cargo.toml index 4035346d35446..d26205c791dc0 100644 --- a/src/librustc_ast_pretty/Cargo.toml +++ b/src/librustc_ast_pretty/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" doctest = false [dependencies] -log = { package = "tracing", version = "0.1" } +tracing = "0.1" rustc_span = { path = "../librustc_span" } rustc_ast = { path = "../librustc_ast" } rustc_target = { path = "../librustc_target" } diff --git a/src/librustc_ast_pretty/pp.rs b/src/librustc_ast_pretty/pp.rs index 4bb806a923e6c..9729c3ad48c86 100644 --- a/src/librustc_ast_pretty/pp.rs +++ b/src/librustc_ast_pretty/pp.rs @@ -132,7 +132,7 @@ //! methods called `Printer::scan_*`, and the 'PRINT' process is the //! method called `Printer::print`. -use log::debug; +use tracing::debug; use std::borrow::Cow; use std::collections::VecDeque; use std::fmt; From fee58ebe20ed6e920afaa8414425e7d04f9dd8ea Mon Sep 17 00:00:00 2001 From: bishtpawan Date: Sun, 2 Aug 2020 13:24:08 +0530 Subject: [PATCH 2/2] Replace from log to tracing --- src/librustc_ast_lowering/item.rs | 2 +- src/librustc_ast_lowering/lib.rs | 2 +- src/librustc_ast_lowering/path.rs | 2 +- src/librustc_ast_pretty/pp.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc_ast_lowering/item.rs b/src/librustc_ast_lowering/item.rs index 3e8565091e58c..5414e58429047 100644 --- a/src/librustc_ast_lowering/item.rs +++ b/src/librustc_ast_lowering/item.rs @@ -17,9 +17,9 @@ use rustc_span::symbol::{kw, sym, Ident}; use rustc_span::Span; use rustc_target::spec::abi; -use tracing::debug; use smallvec::{smallvec, SmallVec}; use std::collections::BTreeSet; +use tracing::debug; pub(super) struct ItemLowerer<'a, 'lowering, 'hir> { pub(super) lctx: &'a mut LoweringContext<'lowering, 'hir>, diff --git a/src/librustc_ast_lowering/lib.rs b/src/librustc_ast_lowering/lib.rs index da36bd8581329..9df7ad2a9acf4 100644 --- a/src/librustc_ast_lowering/lib.rs +++ b/src/librustc_ast_lowering/lib.rs @@ -64,10 +64,10 @@ use rustc_span::source_map::{respan, DesugaringKind, ExpnData, ExpnKind}; use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::Span; -use tracing::{debug, trace}; use smallvec::{smallvec, SmallVec}; use std::collections::BTreeMap; use std::mem; +use tracing::{debug, trace}; macro_rules! arena_vec { ($this:expr; $($x:expr),*) => ({ diff --git a/src/librustc_ast_lowering/path.rs b/src/librustc_ast_lowering/path.rs index 0e13ee7ed3933..2541d6824fec4 100644 --- a/src/librustc_ast_lowering/path.rs +++ b/src/librustc_ast_lowering/path.rs @@ -12,8 +12,8 @@ use rustc_session::lint::BuiltinLintDiagnostics; use rustc_span::symbol::Ident; use rustc_span::Span; -use tracing::debug; use smallvec::smallvec; +use tracing::debug; impl<'a, 'hir> LoweringContext<'a, 'hir> { crate fn lower_qpath( diff --git a/src/librustc_ast_pretty/pp.rs b/src/librustc_ast_pretty/pp.rs index 9729c3ad48c86..ca7f127ced60d 100644 --- a/src/librustc_ast_pretty/pp.rs +++ b/src/librustc_ast_pretty/pp.rs @@ -132,10 +132,10 @@ //! methods called `Printer::scan_*`, and the 'PRINT' process is the //! method called `Printer::print`. -use tracing::debug; use std::borrow::Cow; use std::collections::VecDeque; use std::fmt; +use tracing::debug; /// How to break. Described in more detail in the module docs. #[derive(Clone, Copy, PartialEq)]