Function rustc_const_eval::check_match::constructor_arity
[−]
[src]
pub fn constructor_arity(_cx: &MatchCheckCtxt, ctor: &Constructor, ty: Ty) -> usize
Unstable (
rustc_private
)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.