Struct rustc_mir_build::thir::pattern::usefulness::UsefulnessReport[][src]

pub(crate) struct UsefulnessReport<'p, 'tcx> {
    pub(crate) arm_usefulness: Vec<(MatchArm<'p, 'tcx>, Reachability)>,
    pub(crate) non_exhaustiveness_witnesses: Vec<Pat<'tcx>>,
}

The output of checking a match for exhaustiveness and arm reachability.

Fields

arm_usefulness: Vec<(MatchArm<'p, 'tcx>, Reachability)>

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

non_exhaustiveness_witnesses: Vec<Pat<'tcx>>

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

Auto Trait Implementations

impl<'p, 'tcx> !RefUnwindSafe for UsefulnessReport<'p, 'tcx>

impl<'p, 'tcx> !Send for UsefulnessReport<'p, 'tcx>

impl<'p, 'tcx> !Sync for UsefulnessReport<'p, 'tcx>

impl<'p, 'tcx> Unpin for UsefulnessReport<'p, 'tcx> where
    'tcx: 'p, 

impl<'p, 'tcx> !UnwindSafe for UsefulnessReport<'p, '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, 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.