Struct rustc_mir_build::thir::pattern::deconstruct_pat::SplitConstructorSet
source · pub(super) struct SplitConstructorSet<'tcx> {
pub(super) present: SmallVec<[Constructor<'tcx>; 1]>,
pub(super) missing: Vec<Constructor<'tcx>>,
}Expand description
Describes the result of analyzing the constructors in a column of a match.
present is morally the set of constructors present in the column, and missing is the set of
constructors that exist in the type but are not present in the column.
More formally, they respect the following constraints:
- the union of
presentandmissingcovers the whole type presentandmissingare disjoint- neither contains wildcards
- each constructor in
presentis covered by some non-wildcard constructor in the column - together, the constructors in
presentcover all the non-wildcard constructor in the column - non-wildcards in the column do no cover anything in
missing - constructors in
presentandmissingare split for the column; in other words, they are either fully included in or disjoint from each constructor in the column. This avoids non-trivial intersections like between0..10and5..15.
Fields§
§present: SmallVec<[Constructor<'tcx>; 1]>§missing: Vec<Constructor<'tcx>>Trait Implementations§
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for SplitConstructorSet<'tcx>
impl<'tcx> Send for SplitConstructorSet<'tcx>
impl<'tcx> Sync for SplitConstructorSet<'tcx>
impl<'tcx> Unpin for SplitConstructorSet<'tcx>
impl<'tcx> !UnwindSafe for SplitConstructorSet<'tcx>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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: 88 bytes