Function rustc_typeck::middle::check_match::constructor_arityExperimental [-]  [+] [src]

pub fn constructor_arity(cx: &MatchCheckCtxt, ctor: &Constructor, ty: &TyS) -> uint

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 (_, 42u, Some([])) has the arity of 3. A struct pattern's arity is the number of fields it contains, etc.