Function rustc_expand::mbe::macro_check::check_occurrences
source · [−]fn check_occurrences(
sess: &ParseSess,
node_id: NodeId,
rhs: &TokenTree,
macros: &Stack<'_, MacroState<'_>>,
binders: &FxHashMap<MacroRulesNormalizedIdent, BinderInfo>,
ops: &Stack<'_, KleeneToken>,
valid: &mut bool
)
Expand description
Checks rhs
as part of the RHS of a macro definition and sets valid
to false in case of
errors.
Arguments:
sess
is used to emit diagnostics and lintsnode_id
is used to emit lintsrhs
is checked as part of a RHSmacros
is the stack of possible outer macrosbinders
contains the binders of the associated LHSops
is the stack of Kleene operators from the RHSvalid
is set in case of errors