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:
parent
760226733e
commit
0fb01d219c
19 changed files with 56 additions and 41 deletions
|
@ -20,7 +20,7 @@ pub fn expand_option_env<'cx>(cx: &'cx mut ExtCtxt<'_>,
|
|||
Some(v) => v,
|
||||
};
|
||||
|
||||
let sp = sp.apply_mark(cx.current_expansion.id);
|
||||
let sp = cx.with_legacy_ctxt(sp);
|
||||
let e = match env::var(&*var.as_str()) {
|
||||
Err(..) => {
|
||||
let lt = cx.lifetime(sp, Ident::with_dummy_span(kw::StaticLifetime));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue