Crate rustc_pattern_analysis

Source
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.

Modules§

constructor
As explained in crate::usefulness, values and patterns are made from constructors applied to fields. This file defines a Constructor enum and various operations to manipulate them.
errors
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§

IndexVec
An owned contiguous collection of Ts, indexed by I rather than by usize.
MatchArm
The arm of a match expression.
PrivateUninhabitedField
bool newtype that indicates whether this is a privately uninhabited field that we should skip during analysis.

Statics§

DEFAULT_LOCALE_RESOURCE
Raw content of Fluent resource for this crate, generated by fluent_messages macro, imported by rustc_driver to include all crates’ resources in one bundle.

Traits§

Captures
Idx
Represents some newtyped usize wrapper.
PatCx
Context that provides type information about constructors.