Introduce HygieneFrames for proper token hyginee

This commit is contained in:
Edwin Cheng 2021-01-02 20:25:05 +08:00
parent 51d29fe554
commit fe5340d970
7 changed files with 184 additions and 54 deletions

View file

@ -123,7 +123,7 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option<Path>
// We follow what it did anyway :)
if segments.len() == 1 && kind == PathKind::Plain {
if let Some(_macro_call) = path.syntax().parent().and_then(ast::MacroCall::cast) {
if let Some(crate_id) = hygiene.local_inner_macros() {
if let Some(crate_id) = hygiene.local_inner_macros(path) {
kind = PathKind::DollarCrate(crate_id);
}
}