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> DynSend for ParseResult<T, F>
impl<T, F> DynSync for ParseResult<T, F>
impl<T, F> Freeze for ParseResult<T, F>
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>
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
source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Filterable for T
impl<T> Filterable for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
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.