Function rustc_builtin_macros::edition_panic::expand_panic
source · pub(crate) fn expand_panic<'cx>(
cx: &'cx mut ExtCtxt<'_>,
sp: Span,
tts: TokenStream,
) -> MacroExpanderResult<'cx>
Expand description
This expands to either
$crate::panic::panic_2015!(...)
or$crate::panic::panic_2021!(...)
depending on the edition.
This is used for both std::panic!() and core::panic!().
$crate
will refer to either the std
or core
crate depending on which
one we’re expanding from.