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

@@ -30,7 +30,7 @@ pub fn expand_global_asm<'cx>(cx: &'cx mut ExtCtxt<'_>,
id: ast::DUMMY_NODE_ID,
node: ast::ItemKind::GlobalAsm(P(global_asm)),
vis: respan(sp.shrink_to_lo(), ast::VisibilityKind::Inherited),
span: sp.with_ctxt(cx.backtrace()),
span: cx.with_legacy_ctxt(sp),
tokens: None,
})])
}