Function rustc_lint::middle::check_match::constructor_arityUnstable [-] [+] [src]

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

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.