Expand description
Analysis of patterns, notably match exhaustiveness checking. The main entrypoint for this crate
is usefulness::compute_match_usefulness. For rustc-specific types and entrypoints, see the
rustc module.
Re-exportsยง
pub(crate) use crate::constructor::Constructor;๐pub(crate) use crate::constructor::ConstructorSet;๐pub(crate) use crate::constructor::IntRange;๐pub(crate) use crate::pat::DeconstructedPat;๐pub(crate) use std::fmt;๐
Modulesยง
- checks ๐
- Contains checks that must be run to validate matches before performing usefulness analysis.
- constructor
- As explained in
crate::usefulness, values and patterns are made from constructors applied to fields. This file defines aConstructorenum and various operations to manipulate them. - diagnostics
- lints ๐
- pat
- As explained in
crate::usefulness, values and patterns are made from constructors applied to fields. This file defines types that represent patterns in this way. - pat_
column - rustc
- usefulness
- Match exhaustiveness and redundancy algorithm
Structsยง
- Index
Vec - An owned contiguous collection of
Ts, indexed byIrather than byusize. - Match
Arm - The arm of a match expression.
- Private
Uninhabited Field boolnewtype that indicates whether this is a privately uninhabited field that we should skip during analysis.