Allow LocalDefId as the argument to def_path_str
This commit is contained in:
@@ -494,7 +494,7 @@ fn check_item_type(tcx: TyCtxt<'_>, id: hir::ItemId) {
|
||||
debug!(
|
||||
"check_item_type(it.def_id={:?}, it.name={})",
|
||||
id.owner_id,
|
||||
tcx.def_path_str(id.owner_id.to_def_id())
|
||||
tcx.def_path_str(id.owner_id)
|
||||
);
|
||||
let _indenter = indenter();
|
||||
match tcx.def_kind(id.owner_id) {
|
||||
|
||||
@@ -155,7 +155,7 @@ fn check_item<'tcx>(tcx: TyCtxt<'tcx>, item: &'tcx hir::Item<'tcx>) {
|
||||
|
||||
debug!(
|
||||
?item.owner_id,
|
||||
item.name = ? tcx.def_path_str(def_id.to_def_id())
|
||||
item.name = ? tcx.def_path_str(def_id)
|
||||
);
|
||||
|
||||
match item.kind {
|
||||
@@ -251,7 +251,7 @@ fn check_foreign_item(tcx: TyCtxt<'_>, item: &hir::ForeignItem<'_>) {
|
||||
|
||||
debug!(
|
||||
?item.owner_id,
|
||||
item.name = ? tcx.def_path_str(def_id.to_def_id())
|
||||
item.name = ? tcx.def_path_str(def_id)
|
||||
);
|
||||
|
||||
match item.kind {
|
||||
|
||||
@@ -22,7 +22,7 @@ fn check_impl(tcx: TyCtxt<'_>, impl_def_id: LocalDefId, trait_ref: ty::TraitRef<
|
||||
debug!(
|
||||
"(checking implementation) adding impl for trait '{:?}', item '{}'",
|
||||
trait_ref,
|
||||
tcx.def_path_str(impl_def_id.to_def_id())
|
||||
tcx.def_path_str(impl_def_id)
|
||||
);
|
||||
|
||||
// Skip impls where one of the self type is an error type.
|
||||
|
||||
@@ -92,7 +92,7 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
|
||||
|
||||
fn build_constraints_for_item(&mut self, def_id: LocalDefId) {
|
||||
let tcx = self.tcx();
|
||||
debug!("build_constraints_for_item({})", tcx.def_path_str(def_id.to_def_id()));
|
||||
debug!("build_constraints_for_item({})", tcx.def_path_str(def_id));
|
||||
|
||||
// Skip items with no generics - there's nothing to infer in them.
|
||||
if tcx.generics_of(def_id).count() == 0 {
|
||||
|
||||
Reference in New Issue
Block a user