Enum rustc_expand::mbe::macro_parser::ParseResult[][src]

pub(crate) enum ParseResult<T> {
    Success(T),
    Failure(Token, &'static str),
    Error(SpanString),
    ErrorReported,
}
Expand description

Represents the possible results of an attempted parse.

Variants

Success(T)

Parsed successfully.

Tuple Fields of Success

0: T
Failure(Token, &'static str)

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.

Tuple Fields of Failure

0: Token1: &'static str
Error(SpanString)

Fatal error (malformed macro?). Abort compilation.

Tuple Fields of Error

0: Span1: String
ErrorReported

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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.