]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/_match.rs
Rename *shallow_resolve to *shallow_resolve_type
[rust.git] / src / librustc_typeck / check / _match.rs
index 8cdfbf5f55ca050ace9ca29c7f9089ddc97e68f4..f03a3bde84e4ce46a0d64d9b5558f4b14c426bfe 100644 (file)
@@ -350,7 +350,7 @@ pub fn check_pat_walk(
                 }
             }
             PatKind::Ref(ref inner, mutbl) => {
-                let expected = self.shallow_resolve(expected);
+                let expected = self.shallow_resolve_type(expected);
                 if self.check_dereferencable(pat.span, expected, &inner) {
                     // `demand::subtype` would be good enough, but using
                     // `eqtype` turns out to be equally general. See (*)
@@ -519,7 +519,7 @@ pub fn check_pat_walk(
 
     pub fn check_dereferencable(&self, span: Span, expected: Ty<'tcx>, inner: &hir::Pat) -> bool {
         if let PatKind::Binding(..) = inner.node {
-            if let Some(mt) = self.shallow_resolve(expected).builtin_deref(true) {
+            if let Some(mt) = self.shallow_resolve_type(expected).builtin_deref(true) {
                 if let ty::Dynamic(..) = mt.ty.sty {
                     // This is "x = SomeTrait" being reduced from
                     // "let &x = &SomeTrait" or "let box x = Box<SomeTrait>", an error.