[−][src]Enum rustc_mir_build::thir::pattern::_match::Usefulness
Variants
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.
Carries a list of witnesses of non-exhaustiveness.
Implementations
impl<'tcx> Usefulness<'tcx>[src]
pub(in thir::pattern::_match) fn new_useful(
preference: WitnessPreference
) -> Self[src]
preference: WitnessPreference
) -> Self
pub(in thir::pattern::_match) fn is_useful(
&self
) -> bool[src]
&self
) -> bool
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]
self,
pcx: PatCtxt<'_, 'p, 'tcx>,
ctor: &Constructor<'tcx>,
ctor_wild_subpatterns: &Fields<'p, 'tcx>
) -> Self
Trait Implementations
impl<'tcx> Clone for Usefulness<'tcx>[src]
pub fn clone(&self) -> Usefulness<'tcx>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,