crate fn pat_ty_adjusted(&self, pat: &hir::Pat<'_>) -> McResult<Ty<'tcx>> {
        // Check for implicit `&` types wrapping the pattern; note
        // that these are never attached to binding patterns, so
        // actually this is somewhat "disjoint" from the code below
        // that aims to account for `ref x`.
        if let Some(vec) = self.tables.pat_adjustments().get(pat.hir_id) {
            if let Some(first_ty) = vec.first() {
                debug!("pat_ty(pat={:?}) found adjusted ty `{:?}`", pat, first_ty);
                return Ok(first_ty);
            }
        }

        self.pat_ty_unadjusted(pat)
    }
/// Returns the type of value that this pattern matches against.
/// Some non-obvious cases:
///
/// - a `ref x` binding matches against a value of type `T` and gives
///   `x` the type `&T`; we return `T`.
/// - a pattern with implicit derefs (thanks to default binding
///   modes #42640) may look like `Some(x)` but in fact have
///   implicit deref patterns attached (e.g., it is really
///   `&Some(x)`). In that case, we return the "outermost" type
///   (e.g., `&Option<T>).
Returns the type of value that this pattern matches against.
Some non-obvious cases.


Returns the type of value that this pattern matches against . Some non - obvious cases .
crate fn pat_ty_adjusted(&self, pat: &hir::Pat<'_>) -> McResult<Ty<'tcx>> {
        // Check for implicit `&` types wrapping the pattern; note
        // that these are never attached to binding patterns, so
        // actually this is somewhat "disjoint" from the code below
        // that aims to account for `ref x`.
        if let Some(vec) = self.tables.pat_adjustments().get(pat.hir_id) {
            if let Some(first_ty) = vec.first() {
                debug!("pat_ty(pat={:?}) found adjusted ty `{:?}`", pat, first_ty);
                return Ok(first_ty);
            }
        }
        self.pat_ty_unadjusted(pat)
    }
crate fn pat_ty_adjusted ( & self , pat : & hir :: Pat < ' _ > ) -> McResult < Ty < ' tcx > > { // Check for implicit `&` types wrapping the pattern; note // that these are never attached to binding patterns, so // actually this is somewhat "disjoint" from the code below // that aims to account for `ref x`. if let Some ( vec ) = self . tables . pat_adjustments ( ) . get ( pat . hir_id ) { if let Some ( first_ty ) = vec . first ( ) { debug ! ( " " pat first_ty ) ; return Ok ( first_ty ) ; } } self . pat_ty_unadjusted ( pat ) }
Returns the type of value that this pattern matches against.
Returns the type of value that this pattern matches against .
&self
pat
&hir::Pat<'_>
&self
pat
&hir::Pat<'_>