pub struct RecAscription {
pub colon: ColonTok,
pub ty: TypeExpr,
}Expand description
A let-rec binding’s optional : ty ascription (see RecBinding’s
doc comment). A direct (non-erased) TypeExpr field: RecBinding is
already inside this #[recurse] module (embedded directly by
Expr::LetRecIn, not through an eraser), and connecting it straight
to TypeExpr — one of the module’s three self-recursive SCC roots —
is exactly the same kind of cross-root DAG edge RecBinding.params: Vec<PatBot> already makes to the PatBot root; TypeExpr never
refers back to Expr/PatBot/RecBinding, so no new cycle results.
Fields§
§colon: ColonTok§ty: TypeExprTrait Implementations§
Source§impl Clone for RecAscription
impl Clone for RecAscription
Source§fn clone(&self) -> RecAscription
fn clone(&self) -> RecAscription
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RecAscription
impl Debug for RecAscription
Source§impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for RecAscription
impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for RecAscription
Source§type Error = ParseError<<__SyanMacro_Atom as Spanned>::Span>
type Error = ParseError<<__SyanMacro_Atom as Spanned>::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<__SyanMacro_S: ParseStream<Atom = __SyanMacro_Atom>>(
__syan_stream: &mut __SyanMacro_S,
) -> Result<Self, Self::Error>
fn parse_stream<__SyanMacro_S: ParseStream<Atom = __SyanMacro_Atom>>( __syan_stream: &mut __SyanMacro_S, ) -> Result<Self, Self::Error>
Parse from a reborrowable stream. Read more
Source§impl PartialEq for RecAscription
impl PartialEq for RecAscription
impl StructuralPartialEq for RecAscription
Source§impl<__SyanMacro_Atom> Unparse<__SyanMacro_Atom> for RecAscription
impl<__SyanMacro_Atom> Unparse<__SyanMacro_Atom> for RecAscription
Auto Trait Implementations§
impl Freeze for RecAscription
impl RefUnwindSafe for RecAscription
impl Send for RecAscription
impl Sync for RecAscription
impl Unpin for RecAscription
impl UnsafeUnpin for RecAscription
impl UnwindSafe for RecAscription
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