Enum rustc_ap_rustc_ast::token::NonterminalKind [−][src]
pub enum NonterminalKind {
Show variants
Item,
Block,
Stmt,
PatParam {
inferred: bool,
},
PatWithOr,
Expr,
Ty,
Ident,
Lifetime,
Literal,
Meta,
Path,
Vis,
TT,
}Variants
Show fields
Fields of PatParam
inferred: boolKeep track of whether the user used :pat_param or :pat and we inferred it from the
edition of the span. This is used for diagnostics.
Implementations
pub fn from_symbol(
symbol: Symbol,
edition: impl FnOnce() -> Edition
) -> Option<NonterminalKind>[src]
pub fn from_symbol(
symbol: Symbol,
edition: impl FnOnce() -> Edition
) -> Option<NonterminalKind>[src]The edition closure is used to get the edition for the given symbol. Doing
span.edition() is expensive, so we do it lazily.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for NonterminalKindimpl Send for NonterminalKindimpl Sync for NonterminalKindimpl Unpin for NonterminalKindimpl UnwindSafe for NonterminalKindBlanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V