X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_typeck%2Fsrc%2Fcheck%2Fcoercion.rs;h=be7ac006926a9fc5201b24f41f59681b166c3949;hb=09cb29c64c2a0e15debf2d6fca2bc7c71a682033;hp=8204a25e9112b71d99cea21425fefa753227178c;hpb=6024426e86af6dbe3991901752d886e9d43efa2a;p=rust.git diff --git a/compiler/rustc_typeck/src/check/coercion.rs b/compiler/rustc_typeck/src/check/coercion.rs index 8204a25e911..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, }); @@ -1275,7 +1275,7 @@ pub fn expected_ty(&self) -> Ty<'tcx> { /// Returns the current "merged type", representing our best-guess /// at the LUB of the expressions we've seen so far (if any). This - /// isn't *final* until you call `self.complete()`, which will return + /// isn't *final* until you call `self.final()`, which will return /// the merged type. pub fn merged_ty(&self) -> Ty<'tcx> { self.final_ty.unwrap_or(self.expected_ty)