pub(crate) type NamedParseResult<F> = ParseResult<FxHashMap<MacroRulesNormalizedIdent, NamedMatch>, F>;
Expand description

A ParseResult where the Success variant contains a mapping of MacroRulesNormalizedIdents to NamedMatches. This represents the mapping of metavars to the token trees they bind to.

Aliased Type§

enum NamedParseResult<F> {
    Success(HashMap<MacroRulesNormalizedIdent, NamedMatch, BuildHasherDefault<FxHasher>>),
    Failure(F),
    Error(Span, String),
    ErrorReported(ErrorGuaranteed),
}

Variants§

§

Success(HashMap<MacroRulesNormalizedIdent, NamedMatch, BuildHasherDefault<FxHasher>>)

Parsed successfully.

§

Failure(F)

Arm failed to match. If the second parameter is token::Eof, it indicates an unexpected end of macro invocation. Otherwise, it indicates that no rules expected the given token. The usize is the approximate position of the token in the input token stream.

§

Error(Span, String)

Fatal error (malformed macro?). Abort compilation.

§

ErrorReported(ErrorGuaranteed)

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.