pub struct WitnessPat<Cx: PatCx> { /* private fields */ }
Expand description
Same idea as DeconstructedPat
, except this is a fictitious pattern built up for diagnostics
purposes. As such they don’t use interning and can be cloned.
Implementations§
Source§impl<Cx: PatCx> WitnessPat<Cx>
impl<Cx: PatCx> WitnessPat<Cx>
pub fn ctor(&self) -> &Constructor<Cx>
pub fn ty(&self) -> &Cx::Ty
pub fn is_never_pattern(&self) -> bool
pub fn iter_fields(&self) -> impl Iterator<Item = &WitnessPat<Cx>>
Trait Implementations§
Source§impl<Cx: PatCx> Clone for WitnessPat<Cx>
impl<Cx: PatCx> Clone for WitnessPat<Cx>
Auto Trait Implementations§
impl<Cx> Freeze for WitnessPat<Cx>
impl<Cx> RefUnwindSafe for WitnessPat<Cx>where
<Cx as PatCx>::Ty: RefUnwindSafe,
<Cx as PatCx>::VariantIdx: RefUnwindSafe,
<Cx as PatCx>::StrLit: RefUnwindSafe,
impl<Cx> Send for WitnessPat<Cx>
impl<Cx> Sync for WitnessPat<Cx>
impl<Cx> Unpin for WitnessPat<Cx>
impl<Cx> UnwindSafe for WitnessPat<Cx>where
<Cx as PatCx>::Ty: UnwindSafe,
<Cx as PatCx>::VariantIdx: UnwindSafe,
<Cx as PatCx>::StrLit: UnwindSafe,
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