]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast_lowering/src/index.rs
Rollup merge of #101559 - andrewpollack:add-backtrace-off-fuchsia, r=tmandry
[rust.git] / compiler / rustc_ast_lowering / src / index.rs
index ea6884836e301a0b9ca7994838bdcd7dc5d3a521..85846b56762e4cc0331b417f9fb28fe829a7907a 100644 (file)
@@ -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.