Update local variables and tracing calls
Most of the tracing calls didn't fully leverage the power of `tracing`. For example, several of them used to hard-code method names / tracing spans as well as variable names. Use `#[instrument]` and `?var` / `%var` (etc.) instead. In my opinion, this is the proper way to migrate them from the old AstConv nomenclature to the new HIR ty lowering one.
This commit is contained in:
parent
82c2c8deb1
commit
b79335dbed
11 changed files with 136 additions and 148 deletions
|
@ -37,6 +37,7 @@ pub use crate::traits::{MethodViolationCode, ObjectSafetyViolation};
|
|||
/// Currently that is `Self` in supertraits. This is needed
|
||||
/// because `object_safety_violations` can't be used during
|
||||
/// type collection.
|
||||
#[instrument(level = "debug", skip(tcx))]
|
||||
pub fn hir_ty_lowering_object_safety_violations(
|
||||
tcx: TyCtxt<'_>,
|
||||
trait_def_id: DefId,
|
||||
|
@ -47,9 +48,7 @@ pub fn hir_ty_lowering_object_safety_violations(
|
|||
.filter(|spans| !spans.is_empty())
|
||||
.map(ObjectSafetyViolation::SupertraitSelf)
|
||||
.collect();
|
||||
|
||||
debug!("astconv_object_safety_violations(trait_def_id={:?}) = {:?}", trait_def_id, violations);
|
||||
|
||||
debug!(?violations);
|
||||
violations
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue