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:
@@ -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)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user