pub enum Usefulness<'p, Cx: PatCx> {
Useful(Vec<&'p DeconstructedPat<Cx>>),
Redundant,
}
Expand description
Indicates whether or not a given arm is useful.
Variants§
Useful(Vec<&'p DeconstructedPat<Cx>>)
The arm is useful. This additionally carries a set of or-pattern branches that have been found to be redundant despite the overall arm being useful. Used only in the presence of or-patterns, otherwise it stays empty.
Redundant
The arm is redundant and can be removed without changing the behavior of the match expression.
Trait Implementations§
Auto Trait Implementations§
impl<'p, Cx> Freeze for Usefulness<'p, Cx>
impl<'p, Cx> RefUnwindSafe for Usefulness<'p, Cx>where
<Cx as PatCx>::PatData: RefUnwindSafe,
<Cx as PatCx>::StrLit: RefUnwindSafe,
<Cx as PatCx>::Ty: RefUnwindSafe,
<Cx as PatCx>::VariantIdx: RefUnwindSafe,
impl<'p, Cx> Send for Usefulness<'p, Cx>
impl<'p, Cx> Sync for Usefulness<'p, Cx>
impl<'p, Cx> Unpin for Usefulness<'p, Cx>
impl<'p, Cx> UnwindSafe for Usefulness<'p, Cx>where
<Cx as PatCx>::PatData: RefUnwindSafe,
<Cx as PatCx>::StrLit: RefUnwindSafe,
<Cx as PatCx>::Ty: RefUnwindSafe,
<Cx as PatCx>::VariantIdx: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more