Audit uses of apply_mark in built-in macros

Replace them with equivalents of `Span::{def_site,call_site}` from proc macro API.
The new API is much less error prone and doesn't rely on macros having default transparency.
This commit is contained in:
Vadim Petrochenkov
2019-08-21 21:28:22 +03:00
parent 760226733e
commit 0fb01d219c
19 changed files with 56 additions and 41 deletions

View File

@@ -59,6 +59,6 @@ pub fn expand_syntax_ext(
} else if has_errors {
return DummyResult::any(sp);
}
let sp = sp.apply_mark(cx.current_expansion.id);
let sp = cx.with_legacy_ctxt(sp);
base::MacEager::expr(cx.expr_str(sp, Symbol::intern(&accumulator)))
}