[−][src]Enum rustc_mir_build::thir::pattern::_match::Usefulness

pub(crate) enum Usefulness<'tcx> {
    Useful(Vec<FxHashSet<Span>>),
    UsefulWithWitness(Vec<Witness<'tcx>>),
    NotUseful,
}

Variants

Useful(Vec<FxHashSet<Span>>)

Carries, for each column in the matrix, a set of sub-branches that have been found to be unreachable. Used only in the presence of or-patterns, otherwise it stays empty.

UsefulWithWitness(Vec<Witness<'tcx>>)

Carries a list of witnesses of non-exhaustiveness.

NotUseful

Implementations

impl<'tcx> Usefulness<'tcx>[src]

pub(in thir::pattern::_match) fn new_useful(
    preference: WitnessPreference
) -> Self
[src]

pub(in thir::pattern::_match) fn is_useful(
    &self
) -> bool
[src]

pub(in thir::pattern::_match) fn apply_constructor<'p>(
    self,
    pcx: PatCtxt<'_, 'p, 'tcx>,
    ctor: &Constructor<'tcx>,
    ctor_wild_subpatterns: &Fields<'p, 'tcx>
) -> Self
[src]

Trait Implementations

impl<'tcx> Clone for Usefulness<'tcx>[src]

impl<'tcx> Debug for Usefulness<'tcx>[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for Usefulness<'tcx>

impl<'tcx> !Send for Usefulness<'tcx>

impl<'tcx> !Sync for Usefulness<'tcx>

impl<'tcx> Unpin for Usefulness<'tcx>

impl<'tcx> !UnwindSafe for Usefulness<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.