From c6e3ea475b9378fd551064e7b4e74ee96855337f Mon Sep 17 00:00:00 2001 From: varkor Date: Mon, 25 Mar 2019 23:37:00 +0000 Subject: [PATCH] Visit path in `walk_mac` --- src/libsyntax/visit.rs | 4 ++-- src/libsyntax_ext/proc_macro_decls.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs index 6b3a30ccb54..fbd6641f7c2 100644 --- a/src/libsyntax/visit.rs +++ b/src/libsyntax/visit.rs @@ -647,8 +647,8 @@ pub fn walk_stmt<'a, V: Visitor<'a>>(visitor: &mut V, statement: &'a Stmt) { } } -pub fn walk_mac<'a, V: Visitor<'a>>(_: &mut V, _: &Mac) { - // Empty! +pub fn walk_mac<'a, V: Visitor<'a>>(visitor: &mut V, mac: &'a Mac) { + visitor.visit_path(&mac.node.path, DUMMY_NODE_ID); } pub fn walk_anon_const<'a, V: Visitor<'a>>(visitor: &mut V, constant: &'a AnonConst) { diff --git a/src/libsyntax_ext/proc_macro_decls.rs b/src/libsyntax_ext/proc_macro_decls.rs index d5f37aff222..22fee902aea 100644 --- a/src/libsyntax_ext/proc_macro_decls.rs +++ b/src/libsyntax_ext/proc_macro_decls.rs @@ -317,7 +317,7 @@ impl<'a> Visitor<'a> for CollectProcMacros<'a> { self.in_root = prev_in_root; } - fn visit_mac(&mut self, mac: &ast::Mac) { + fn visit_mac(&mut self, mac: &'a ast::Mac) { visit::walk_mac(self, mac) } }