]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/check/coercion.rs
Auto merge of #93439 - abrown:cf-protection, r=nagisa
[rust.git] / compiler / rustc_typeck / src / check / coercion.rs
index 3668ecd234c64e1c8b216af4f6d07e653ba8038b..be7ac006926a9fc5201b24f41f59681b166c3949 100644 (file)
@@ -142,7 +142,7 @@ fn unify_and<F>(&self, a: Ty<'tcx>, b: Ty<'tcx>, f: F) -> CoerceResult<'tcx>
     where
         F: FnOnce(Ty<'tcx>) -> Vec<Adjustment<'tcx>>,
     {
-        self.unify(&a, &b)
+        self.unify(a, b)
             .and_then(|InferOk { value: ty, obligations }| success(f(ty), ty, obligations))
     }
 
@@ -472,7 +472,7 @@ fn coerce_borrowed_pointer(
             }
         };
         adjustments.push(Adjustment {
-            kind: Adjust::Borrow(AutoBorrow::Ref(r_borrow, mutbl)),
+            kind: Adjust::Borrow(AutoBorrow::Ref(*r_borrow, mutbl)),
             target: ty,
         });