Auto merge of #104947 - cjgillot:verify-hir-nest, r=oli-obk

Verify that HIR parenting and Def parenting match.

This relationship is relied upon for `tcx.hir_owner_parent` query to return an accurate result.
This commit is contained in:
bors
2022-11-29 10:34:19 +00:00
3 changed files with 54 additions and 32 deletions

View File

@@ -77,7 +77,7 @@ impl<'a, 'hir> NodeCollector<'a, 'hir> {
if hir_id.owner != self.owner {
span_bug!(
span,
"inconsistent DepNode at `{:?}` for `{:?}`: \
"inconsistent HirId at `{:?}` for `{:?}`: \
current_dep_node_owner={} ({:?}), hir_id.owner={} ({:?})",
self.source_map.span_to_diagnostic_string(span),
node,