1
Fork 0

Separate AnonConst from ConstBlock in HIR.

This commit is contained in:
Camille GILLOT 2023-02-25 19:53:37 +00:00
parent 794249d768
commit ca4d0d4c24
19 changed files with 111 additions and 68 deletions

View file

@ -223,6 +223,14 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
});
}
fn visit_inline_const(&mut self, constant: &'hir ConstBlock) {
self.insert(DUMMY_SP, constant.hir_id, Node::ConstBlock(constant));
self.with_parent(constant.hir_id, |this| {
intravisit::walk_inline_const(this, constant);
});
}
fn visit_expr(&mut self, expr: &'hir Expr<'hir>) {
self.insert(expr.span, expr.hir_id, Node::Expr(expr));