rustc_pattern_analysis::rustc

Type Alias UsefulnessReport

Source
pub type UsefulnessReport<'p, 'tcx> = UsefulnessReport<'p, RustcPatCtxt<'p, 'tcx>>;

Aliased Type§

struct UsefulnessReport<'p, 'tcx> {
    pub arm_usefulness: Vec<(MatchArm<'p, RustcPatCtxt<'p, 'tcx>>, Usefulness<'p, RustcPatCtxt<'p, 'tcx>>)>,
    pub non_exhaustiveness_witnesses: Vec<WitnessPat<RustcPatCtxt<'p, 'tcx>>>,
    pub arm_intersections: Vec<BitSet<usize>>,
}

Fields§

§arm_usefulness: Vec<(MatchArm<'p, RustcPatCtxt<'p, 'tcx>>, Usefulness<'p, RustcPatCtxt<'p, 'tcx>>)>

For each arm of the input, whether that arm is useful after the arms above it.

§non_exhaustiveness_witnesses: Vec<WitnessPat<RustcPatCtxt<'p, 'tcx>>>

If the match is exhaustive, this is empty. If not, this contains witnesses for the lack of exhaustiveness.

§arm_intersections: Vec<BitSet<usize>>

For each arm, a set of indices of arms above it that have non-empty intersection, i.e. there is a value matched by both arms. This may miss real intersections.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 72 bytes