pub struct BindName {
pub name: String,
pub span: Span,
/* private fields */
}Expand description
A binding-position NAME: a plain variable, or ( ‹op› ) — a
parenthesized (possibly user-defined) operator name (OpNameTok), e.g.
let (+++>) = ... Upstream’s var nonterminal folds VAR and LPAREN binop RPAREN into one production; this is that nonterminal, reused by
TopLet::name, ast::Expr::LetIn’s name, ast::RecBinding::name,
and SigItem::Val’s name — the four binding positions upstream admits
it in. .name/.span mirror VarTok’s own public fields exactly, so an
elaborate.rs/typecheck.rs callsite reading foo.name.name/
foo.name.span works against either type. See also
ast::Atomic::OpRef, the matching atomic-expression form.
Fields§
§name: String§span: SpanTrait Implementations§
Source§impl Parse<WithSpan<Token, Span>> for BindName
impl Parse<WithSpan<Token, Span>> for BindName
Source§type Error = ParseError<Span>
type Error = ParseError<Span>
Every error must be convertible to the universal one, so a field’s failure can become the
enclosing type’s failure with no per-field where-predicate. Stating it HERE rather than at
each derived impl is what keeps it out of the obligation graph: a per-field
<FieldTy as Parse<Atom>>::Error: Into<…> predicate re-creates a projection cycle on a
recursive field (E0275), which decycle’s bound-peeling does not break.Source§fn parse_stream<S: ParseStream<Atom = Atom>>(
stream: &mut S,
) -> Result<Self, Self::Error>
fn parse_stream<S: ParseStream<Atom = Atom>>( stream: &mut S, ) -> Result<Self, Self::Error>
Parse from a reborrowable stream. Read more
impl StructuralPartialEq for BindName
Auto Trait Implementations§
impl Freeze for BindName
impl RefUnwindSafe for BindName
impl Send for BindName
impl Sync for BindName
impl Unpin for BindName
impl UnsafeUnpin for BindName
impl UnwindSafe for BindName
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