[−][src]Function rustc_mir::hair::pattern::_match::constructor_arity
fn constructor_arity(_cx: &MatchCheckCtxt, ctor: &Constructor, ty: Ty) -> u64
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
This computes the arity of a constructor. The arity of a constructor is how many subpattern patterns of that constructor should be expanded to.
For instance, a tuple pattern (_, 42, Some([])) has the arity of 3. A struct pattern's arity is the number of fields it contains, etc.