pub struct TypeCmdArgItem {
pub opt_labels: Vec<TypeCmdOptField>,
pub ty: TyErased,
pub opt: Option<OptionalTypeTok>,
pub semi: Option<ListPunctTok>,
}Expand description
One ;-separated element of a TypeAtom::Cmd’s bracketed argument
list: a mandatory ty, or an optional ty? (parser.mly’s txlist,
955-960) — routed through super::TyErased rather than the
narrower TypeApp upstream uses, both to stay a DAG leaf (a direct
TypeApp field here would close TypeAtom -> Cmd -> ... -> TypeApp -> TypeAtom, a fresh cycle through non-root types — see
AppArgErased’s doc comment for the identical hazard) and per this
port’s usual permissive-superset simplification.
opt_labels is the lowered
?(l:τ,…) command-type row PREFIX on this slot (TypeCmdOptDomV1 at
the cst_v1 side): a flat list of label : ty fields, no wrapping
?( sigil/group of its own at this (already-lowered) target — purely
a data carrier, populated by v1/lower.rs::lower_type_cmd_args and
read by typecheck.rs’s lower_type_atom Cmd arm. Every
0.0.6-parsed fixture yields opt_labels == []: no real 0.0.6
TypeCmdArgItem position can contain a bare label : shape (0.0.6’s
grammar has no colon here at all).
Fields§
§opt_labels: Vec<TypeCmdOptField>§ty: TyErased§opt: Option<OptionalTypeTok>§semi: Option<ListPunctTok>Trait Implementations§
Source§impl Clone for TypeCmdArgItem
impl Clone for TypeCmdArgItem
Source§fn clone(&self) -> TypeCmdArgItem
fn clone(&self) -> TypeCmdArgItem
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TypeCmdArgItem
impl Debug for TypeCmdArgItem
Source§impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for TypeCmdArgItemwhere
__SyanMacro_Atom: Spanned + Clone,
Vec<TypeCmdOptField>: Parse<__SyanMacro_Atom>,
TyErased: Parse<__SyanMacro_Atom>,
Option<OptionalTypeTok>: Parse<__SyanMacro_Atom>,
Option<ListPunctTok>: Parse<__SyanMacro_Atom>,
impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for TypeCmdArgItemwhere
__SyanMacro_Atom: Spanned + Clone,
Vec<TypeCmdOptField>: Parse<__SyanMacro_Atom>,
TyErased: Parse<__SyanMacro_Atom>,
Option<OptionalTypeTok>: Parse<__SyanMacro_Atom>,
Option<ListPunctTok>: Parse<__SyanMacro_Atom>,
Source§type Error = ParseError<<__SyanMacro_Atom as Spanned>::Span>
type Error = ParseError<<__SyanMacro_Atom as Spanned>::Span>
<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.