1
Fork 0

Take a LocalDefId in hir::Visitor::visit_fn.

This commit is contained in:
Camille GILLOT 2023-01-22 18:00:33 +00:00
parent 252741673b
commit 3175d03d3b
52 changed files with 235 additions and 211 deletions

View file

@ -275,19 +275,6 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
});
}
fn visit_fn(
&mut self,
fk: intravisit::FnKind<'hir>,
fd: &'hir FnDecl<'hir>,
b: BodyId,
_: Span,
id: HirId,
) {
assert_eq!(self.owner, id.owner);
assert_eq!(self.parent_node, id.local_id);
intravisit::walk_fn(self, fk, fd, b, id);
}
fn visit_block(&mut self, block: &'hir Block<'hir>) {
self.insert(block.span, block.hir_id, Node::Block(block));
self.with_parent(block.hir_id, |this| {