Rollup merge of #59423 - varkor:walk_mac-visit_path, r=petrochenkov

Visit path in `walk_mac`

Fixes https://github.com/rust-lang/rust/issues/54110.
This commit is contained in:
Mazdak Farrokhzad 2019-03-29 02:40:51 +01:00 committed by GitHub
commit 0f4c87cffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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)
}
}