Skip to content

Commit c6e3ea4

Browse files
committed
Visit path in walk_mac
1 parent 33ef0ba commit c6e3ea4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libsyntax/visit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,8 @@ pub fn walk_stmt<'a, V: Visitor<'a>>(visitor: &mut V, statement: &'a Stmt) {
647647
}
648648
}
649649

650-
pub fn walk_mac<'a, V: Visitor<'a>>(_: &mut V, _: &Mac) {
651-
// Empty!
650+
pub fn walk_mac<'a, V: Visitor<'a>>(visitor: &mut V, mac: &'a Mac) {
651+
visitor.visit_path(&mac.node.path, DUMMY_NODE_ID);
652652
}
653653

654654
pub fn walk_anon_const<'a, V: Visitor<'a>>(visitor: &mut V, constant: &'a AnonConst) {

src/libsyntax_ext/proc_macro_decls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ impl<'a> Visitor<'a> for CollectProcMacros<'a> {
317317
self.in_root = prev_in_root;
318318
}
319319

320-
fn visit_mac(&mut self, mac: &ast::Mac) {
320+
fn visit_mac(&mut self, mac: &'a ast::Mac) {
321321
visit::walk_mac(self, mac)
322322
}
323323
}

0 commit comments

Comments
 (0)