diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-09-10 17:12:55 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-09-10 17:12:55 -0400 |
| commit | b1a9f9eae8477042baffe24f560c0ce8fe08e70d (patch) | |
| tree | 91e7cd2ef0ea1fb6ea51fa4f983d9e68c16c176a | |
| parent | 38774aaf7ff14755e9606ed699ade2bbcbc74757 (diff) | |
visit the paths in pre-expansion macros
| -rw-r--r-- | src/librustc/lint/context.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs index b823545aa91..e22792305a0 100644 --- a/src/librustc/lint/context.rs +++ b/src/librustc/lint/context.rs @@ -1117,6 +1117,13 @@ impl<'a> ast_visit::Visitor<'a> for EarlyContext<'a> { } fn visit_mac(&mut self, mac: &'a ast::Mac) { + // FIXME(#54110): So, this setup isn't really right. I think + // that (a) the libsyntax 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.node.path); + run_lints!(self, check_mac, mac); } } |
