Struct rustc_pattern_analysis::usefulness::PlaceCtxt
source · struct PlaceCtxt<'a, Cx: TypeCx> {
cx: &'a Cx,
ty: &'a Cx::Ty,
}Expand description
Context that provides information local to a place under investigation.
Fields§
§cx: &'a Cx§ty: &'a Cx::TyType of the place under investigation.
Implementations§
source§impl<'a, Cx: TypeCx> PlaceCtxt<'a, Cx>
impl<'a, Cx: TypeCx> PlaceCtxt<'a, Cx>
fn ctor_arity(&self, ctor: &Constructor<Cx>) -> usize
fn ctors_for_ty(&self) -> Result<ConstructorSet<Cx>, Cx::Error>
fn wild_from_ctor(&self, ctor: Constructor<Cx>) -> WitnessPat<Cx>
Trait Implementations§
impl<'a, Cx: TypeCx> Copy for PlaceCtxt<'a, Cx>
Auto Trait Implementations§
impl<'a, Cx> RefUnwindSafe for PlaceCtxt<'a, Cx>
impl<'a, Cx> Send for PlaceCtxt<'a, Cx>
impl<'a, Cx> Sync for PlaceCtxt<'a, Cx>
impl<'a, Cx> Unpin for PlaceCtxt<'a, Cx>
impl<'a, Cx> UnwindSafe for PlaceCtxt<'a, Cx>
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
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes