rustc_ast: Do not panic by default when visiting macro calls

This commit is contained in:
Vadim Petrochenkov 2020-11-03 20:26:17 +03:00
parent 0cd1516696
commit 3237b3886c
16 changed files with 8 additions and 71 deletions

View file

@ -271,14 +271,8 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
}
fn visit_mac(&mut self, mac: &'a ast::MacCall) {
// FIXME(#54110): So, this setup isn't really right. I think
// that (a) the librustc_ast visitor ought to be doing this as
// part of `walk_mac`, and (b) we should be calling
// `visit_path`, *but* that would require a `NodeId`, and I
// want to get #53686 fixed quickly. -nmatsakis
ast_visit::walk_path(self, &mac.path);
run_early_pass!(self, check_mac, mac);
ast_visit::walk_mac(self, mac);
}
}