mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
switch log
crate to tracing
This commit is contained in:
parent
d15f646ff1
commit
ba0947dded
48 changed files with 277 additions and 239 deletions
|
@ -10,7 +10,7 @@ use chalk_ir::{cast::Cast, fold::Fold, interner::HasInterner, VariableKind};
|
|||
use hir_def::lang_item::LangItemTarget;
|
||||
use hir_expand::name::name;
|
||||
use limit::Limit;
|
||||
use log::{info, warn};
|
||||
use tracing::{info, warn};
|
||||
|
||||
use crate::{
|
||||
db::HirDatabase, static_lifetime, AliasEq, AliasTy, BoundVar, Canonical, CanonicalVarKinds,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use cov_mark::hit;
|
||||
use log::debug;
|
||||
use tracing::debug;
|
||||
|
||||
use chalk_ir::{cast::Cast, fold::shift::Shift, CanonicalVarKinds};
|
||||
use chalk_solve::rust_ir::{self, OpaqueTyDatumBound, WellKnownTrait};
|
||||
|
|
|
@ -28,7 +28,10 @@ impl ConstExt for Const {
|
|||
chalk_ir::ConstValue::Concrete(..) => false,
|
||||
|
||||
_ => {
|
||||
log::error!("is_unknown was called on a non-concrete constant value! {:?}", self);
|
||||
tracing::error!(
|
||||
"is_unknown was called on a non-concrete constant value! {:?}",
|
||||
self
|
||||
);
|
||||
true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ pub(crate) fn trait_solve_query(
|
|||
GoalData::DomainGoal(DomainGoal::Holds(WhereClause::AliasEq(_))) => "alias_eq".to_string(),
|
||||
_ => "??".to_string(),
|
||||
});
|
||||
log::info!("trait_solve_query({:?})", goal.value.goal);
|
||||
tracing::info!("trait_solve_query({:?})", goal.value.goal);
|
||||
|
||||
if let GoalData::DomainGoal(DomainGoal::Holds(WhereClause::AliasEq(AliasEq {
|
||||
alias: AliasTy::Projection(projection_ty),
|
||||
|
@ -106,7 +106,7 @@ fn solve(
|
|||
goal: &chalk_ir::UCanonical<chalk_ir::InEnvironment<chalk_ir::Goal<Interner>>>,
|
||||
) -> Option<chalk_solve::Solution<Interner>> {
|
||||
let context = ChalkContext { db, krate };
|
||||
log::debug!("solve goal: {:?}", goal);
|
||||
tracing::debug!("solve goal: {:?}", goal);
|
||||
let mut solver = create_chalk_solver();
|
||||
|
||||
let fuel = std::cell::Cell::new(CHALK_SOLVER_FUEL);
|
||||
|
@ -116,7 +116,7 @@ fn solve(
|
|||
let remaining = fuel.get();
|
||||
fuel.set(remaining - 1);
|
||||
if remaining == 0 {
|
||||
log::debug!("fuel exhausted");
|
||||
tracing::debug!("fuel exhausted");
|
||||
}
|
||||
remaining > 0
|
||||
};
|
||||
|
@ -136,7 +136,7 @@ fn solve(
|
|||
solver.solve_limited(&context, goal, &should_continue)
|
||||
};
|
||||
|
||||
log::debug!("solve({:?}) => {:?}", goal, solution);
|
||||
tracing::debug!("solve({:?}) => {:?}", goal, solution);
|
||||
|
||||
solution
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue