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: bool
Keep 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>
pub fn from_symbol(
symbol: Symbol,
edition: impl FnOnce() -> Edition
) -> Option<NonterminalKind>
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 NonterminalKind
impl Send for NonterminalKind
impl Sync for NonterminalKind
impl Unpin for NonterminalKind
impl UnwindSafe for NonterminalKind
Blanket 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 = T
Should always be Self
pub fn vzip(self) -> V