Assert that HIR nodes are not their own parent.
This commit is contained in:
parent
ccb5595df2
commit
51f486931f
4 changed files with 13 additions and 1 deletions
|
@ -69,6 +69,7 @@ impl<'a, 'hir> NodeCollector<'a, 'hir> {
|
|||
fn insert(&mut self, span: Span, hir_id: HirId, node: Node<'hir>) {
|
||||
debug_assert_eq!(self.owner, hir_id.owner);
|
||||
debug_assert_ne!(hir_id.local_id.as_u32(), 0);
|
||||
debug_assert_ne!(hir_id.local_id, self.parent_node);
|
||||
|
||||
// Make sure that the DepNode of some node coincides with the HirId
|
||||
// owner of that node.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue