Type Alias rustc_pattern_analysis::rustc::Usefulness
source · pub type Usefulness<'p, 'tcx> = Usefulness<'p, RustcPatCtxt<'p, 'tcx>>;
Aliased Type§
enum Usefulness<'p, 'tcx> {
Useful(Vec<(&'p DeconstructedPat<RustcPatCtxt<'p, 'tcx>>, RedundancyExplanation<'p, RustcPatCtxt<'p, 'tcx>>)>),
Redundant(RedundancyExplanation<'p, RustcPatCtxt<'p, 'tcx>>),
}
Variants§
Useful(Vec<(&'p DeconstructedPat<RustcPatCtxt<'p, 'tcx>>, RedundancyExplanation<'p, RustcPatCtxt<'p, 'tcx>>)>)
The arm is useful. This additionally carries a set of or-pattern branches that have been found to be redundant despite the overall arm being useful. Used only in the presence of or-patterns, otherwise it stays empty.
Redundant(RedundancyExplanation<'p, RustcPatCtxt<'p, 'tcx>>)
The arm is redundant and can be removed without changing the behavior of the match expression.
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: 32 bytes
Size for each variant:
Useful
: 24 bytesRedundant
: 24 bytes