Type Alias rustc_pattern_analysis::rustc::DeconstructedPat

source ·
pub type DeconstructedPat<'p, 'tcx> = DeconstructedPat<RustcPatCtxt<'p, 'tcx>>;

Aliased Type§

struct DeconstructedPat<'p, 'tcx> {
    ctor: Constructor<RustcPatCtxt<'p, 'tcx>>,
    fields: Vec<IndexedPat<RustcPatCtxt<'p, 'tcx>>>,
    arity: usize,
    ty: RevealedTy<'tcx>,
    data: &'p Pat<'tcx>,
    pub(crate) uid: PatId,
}

Fields§

§ctor: Constructor<RustcPatCtxt<'p, 'tcx>>§fields: Vec<IndexedPat<RustcPatCtxt<'p, 'tcx>>>§arity: usize

The number of fields in this pattern. E.g. if the pattern is SomeStruct { field12: true, .. } this would be the total number of fields of the struct. This is also the same as self.ctor.arity(self.ty).

§ty: RevealedTy<'tcx>§data: &'p Pat<'tcx>

Extra data to store in a pattern.

§uid: PatId

Globally-unique id used to track usefulness at the level of subpatterns.

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: 144 bytes