Function rustc_expand::mbe::macro_rules::try_match_macro

source ·
pub(super) fn try_match_macro<'matcher, T: Tracker<'matcher>>(
    psess: &ParseSess,
    name: Ident,
    arg: &TokenStream,
    lhses: &'matcher [Vec<MatcherLoc>],
    track: &mut T
) -> Result<(usize, FxHashMap<MacroRulesNormalizedIdent, NamedMatch>), CanRetry>
Expand description

Try expanding the macro. Returns the index of the successful arm and its named_matches if it was successful, and nothing if it failed. On failure, it’s the callers job to use track accordingly to record all errors correctly.