Returns an iterator of expansions that created the given span
Checks whether the expansion is the root expansion or a locally defined macro
Finds the arguments of an assert! or debug_assert! macro call within the macro expansion
Finds the arguments of an assert_eq! or debug_assert_eq! macro call within the macro
expansion
Returns an AST
FormatArgs node if a
format_args expansion is found as a descendant of
expn_idIf node is the “first node” in a macro expansion, returns Some with the ExpnId of the
macro call site (i.e. the parent of the macro expansion). This generally means that node
is the outermost node of an entire macro expansion, but there are some caveats noted below.
This is useful for finding macro calls while visiting the HIR without processing the macro call
at every node within its expansion.
Returns the
Span of the value at
index extended to the previous comma, e.g. for the value
10Span covering the format string and values
Span of the : and format specifiers
Is def_id of assert! or debug_assert!
Returns true if a given Macro DefId is a format macro (e.g. println!)
Is def_id of std::panic, core::panic or any inner implementation macros
Returns an iterator of macro expansions that created the given span.
Note that desugaring expansions are skipped.
If the macro backtrace of span has a macro call at the root expansion
(i.e. not a nested macro call), returns Some with the MacroCall
Checks whether the span is from the root expansion or a locally defined macro