1
Fork 0

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

@ -63,7 +63,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt<'_>,
MacEager::expr(P(ast::Expr {
id: ast::DUMMY_NODE_ID,
node: ast::ExprKind::InlineAsm(P(inline_asm)),
span: sp.with_ctxt(cx.backtrace()),
span: cx.with_legacy_ctxt(sp),
attrs: ThinVec::new(),
}))
}