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:
@@ -23,7 +23,7 @@ pub fn expand_assert<'cx>(
|
||||
}
|
||||
};
|
||||
|
||||
let sp = sp.apply_mark(cx.current_expansion.id);
|
||||
let sp = cx.with_legacy_ctxt(sp);
|
||||
let panic_call = Mac {
|
||||
path: Path::from_ident(Ident::new(sym::panic, sp)),
|
||||
tts: custom_message.unwrap_or_else(|| {
|
||||
|
||||
Reference in New Issue
Block a user