Always import all tracing macros for the entire crate instead of piecemeal by module
This commit is contained in:
parent
d3b22c7267
commit
ee3c835018
88 changed files with 76 additions and 119 deletions
|
@ -332,7 +332,7 @@ pub fn create_compiler_and_run<R>(config: Config, f: impl FnOnce(&Compiler) -> R
|
|||
// JUSTIFICATION: before session exists, only config
|
||||
#[allow(rustc::bad_opt_access)]
|
||||
pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Send) -> R {
|
||||
tracing::trace!("run_compiler");
|
||||
trace!("run_compiler");
|
||||
util::run_in_thread_pool_with_globals(
|
||||
config.opts.edition,
|
||||
config.opts.unstable_opts.threads,
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
||||
mod callbacks;
|
||||
mod errors;
|
||||
pub mod interface;
|
||||
|
|
|
@ -38,7 +38,6 @@ use rustc_span::symbol::{sym, Symbol};
|
|||
use rustc_span::FileName;
|
||||
use rustc_trait_selection::traits;
|
||||
use rustc_typeck as typeck;
|
||||
use tracing::{info, warn};
|
||||
|
||||
use std::any::Any;
|
||||
use std::cell::RefCell;
|
||||
|
@ -165,7 +164,7 @@ pub fn create_resolver(
|
|||
krate: &ast::Crate,
|
||||
crate_name: &str,
|
||||
) -> BoxedResolver {
|
||||
tracing::trace!("create_resolver");
|
||||
trace!("create_resolver");
|
||||
BoxedResolver::new(sess, move |sess, resolver_arenas| {
|
||||
Resolver::new(sess, krate, crate_name, metadata_loader, resolver_arenas)
|
||||
})
|
||||
|
@ -279,7 +278,7 @@ pub fn configure_and_expand(
|
|||
crate_name: &str,
|
||||
resolver: &mut Resolver<'_>,
|
||||
) -> Result<ast::Crate> {
|
||||
tracing::trace!("configure_and_expand");
|
||||
trace!("configure_and_expand");
|
||||
pre_expansion_lint(sess, lint_store, resolver.registered_tools(), &krate, crate_name);
|
||||
rustc_builtin_macros::register_builtin_macros(resolver);
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ impl<'tcx> Queries<'tcx> {
|
|||
pub fn expansion(
|
||||
&self,
|
||||
) -> Result<&Query<(Lrc<ast::Crate>, Rc<RefCell<BoxedResolver>>, Lrc<LintStore>)>> {
|
||||
tracing::trace!("expansion");
|
||||
trace!("expansion");
|
||||
self.expansion.compute(|| {
|
||||
let crate_name = self.crate_name()?.peek().clone();
|
||||
let (krate, lint_store) = self.register_plugins()?.take();
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
use info;
|
||||
use libloading::Library;
|
||||
use rustc_ast as ast;
|
||||
use rustc_codegen_ssa::traits::CodegenBackend;
|
||||
|
@ -31,7 +32,6 @@ use std::path::{Path, PathBuf};
|
|||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::OnceLock;
|
||||
use std::thread;
|
||||
use tracing::info;
|
||||
|
||||
/// Function pointer type that constructs a new CodegenBackend.
|
||||
pub type MakeBackendFn = fn() -> Box<dyn CodegenBackend>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue