Enum rustc_expand::mbe::macro_parser::ParseResult
source · pub(crate) enum ParseResult<T, F> {
Success(T),
Failure(F),
Error(Span, String),
ErrorReported(ErrorGuaranteed),
}
Expand description
Represents the possible results of an attempted parse.
Variants§
Success(T)
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)
Auto Trait Implementations§
impl<T, F> RefUnwindSafe for ParseResult<T, F>where F: RefUnwindSafe, T: RefUnwindSafe,
impl<T, F> !Send for ParseResult<T, F>
impl<T, F> !Sync for ParseResult<T, F>
impl<T, F> Unpin for ParseResult<T, F>where F: Unpin, T: Unpin,
impl<T, F> UnwindSafe for ParseResult<T, F>where F: UnwindSafe, T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.