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>>,
}
Expand description

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

Fields

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

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

non_exhaustiveness_witnesses: Vec<Pat<'tcx>>
Expand description

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]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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