|
1 |
| -use crate::hir::def_id::{DefId, DefIndex, CRATE_DEF_INDEX}; |
| 1 | +use crate::hir::def_id::{DefIndex, CRATE_DEF_INDEX, LocalDefId}; |
2 | 2 | use crate::hir::{self, intravisit, HirId, ItemLocalId};
|
3 | 3 | use crate::hir::itemlikevisit::ItemLikeVisitor;
|
4 | 4 | use rustc_data_structures::fx::FxHashSet;
|
@@ -119,7 +119,7 @@ impl<'a, 'hir> HirIdValidator<'a, 'hir> {
|
119 | 119 | self.error(|| format!(
|
120 | 120 | "ItemLocalIds not assigned densely in {}. \
|
121 | 121 | Max ItemLocalId = {}, missing IDs = {:?}; seens IDs = {:?}",
|
122 |
| - self.hir_map.def_path(DefId::local(owner_def_index)).to_string_no_crate(), |
| 122 | + self.hir_map.def_path(LocalDefId { index: owner_def_index }).to_string_no_crate(), |
123 | 123 | max,
|
124 | 124 | missing_items,
|
125 | 125 | self.hir_ids_seen
|
@@ -154,8 +154,8 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for HirIdValidator<'a, 'hir> {
|
154 | 154 | self.error(|| format!(
|
155 | 155 | "HirIdValidator: The recorded owner of {} is {} instead of {}",
|
156 | 156 | self.hir_map.node_to_string(hir_id),
|
157 |
| - self.hir_map.def_path(DefId::local(hir_id.owner)).to_string_no_crate(), |
158 |
| - self.hir_map.def_path(DefId::local(owner)).to_string_no_crate())); |
| 157 | + self.hir_map.def_path(hir_id.owner_local_def_id()).to_string_no_crate(), |
| 158 | + self.hir_map.def_path(LocalDefId { index: owner }).to_string_no_crate())); |
159 | 159 | }
|
160 | 160 |
|
161 | 161 | self.hir_ids_seen.insert(hir_id.local_id);
|
|
0 commit comments