[−][src]Struct rustc_mir_build::thir::pattern::_match::MissingConstructors

pub(in thir::pattern::_match) struct MissingConstructors<'tcx> {
    all_ctors: SmallVec<[Constructor<'tcx>; 1]>,
    used_ctors: Vec<Constructor<'tcx>>,
}

Fields

all_ctors: SmallVec<[Constructor<'tcx>; 1]>used_ctors: Vec<Constructor<'tcx>>

Implementations

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

pub(in thir::pattern::_match) fn new<'p>(
    pcx: PatCtxt<'_, 'p, 'tcx>
) -> Self
[src]

pub(in thir::pattern::_match) fn is_empty<'p>(
    &self,
    pcx: PatCtxt<'_, 'p, 'tcx>
) -> bool
[src]

pub(in thir::pattern::_match) fn iter<'a, 'p>(
    &'a self,
    pcx: PatCtxt<'a, 'p, 'tcx>
) -> impl Iterator<Item = &'a Constructor<'tcx>> + Captures<'p>
[src]

Iterate over all_ctors \ used_ctors

pub(in thir::pattern::_match) fn report_patterns<'p>(
    &self,
    pcx: PatCtxt<'_, 'p, 'tcx>
) -> SmallVec<[Pat<'tcx>; 1]>
[src]

List the patterns corresponding to the missing constructors. In some cases, instead of listing all constructors of a given type, we prefer to simply report a wildcard.

Trait Implementations

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

Auto Trait Implementations

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

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

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

impl<'tcx> Unpin for MissingConstructors<'tcx>

impl<'tcx> !UnwindSafe for MissingConstructors<'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.