X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_typeck%2Fsrc%2Fcheck%2Fcoercion.rs;h=be7ac006926a9fc5201b24f41f59681b166c3949;hb=09cb29c64c2a0e15debf2d6fca2bc7c71a682033;hp=3668ecd234c64e1c8b216af4f6d07e653ba8038b;hpb=34997f0114e30ebf81e38ab44b1a1e0ce55297ad;p=rust.git diff --git a/compiler/rustc_typeck/src/check/coercion.rs b/compiler/rustc_typeck/src/check/coercion.rs index 3668ecd234c..be7ac006926 100644 --- a/compiler/rustc_typeck/src/check/coercion.rs +++ b/compiler/rustc_typeck/src/check/coercion.rs @@ -142,7 +142,7 @@ fn unify_and(&self, a: Ty<'tcx>, b: Ty<'tcx>, f: F) -> CoerceResult<'tcx> where F: FnOnce(Ty<'tcx>) -> Vec>, { - 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, });