Skip to content

Commit 38c6480

Browse files
committed
rename fn param to clarify its adjustments on a
1 parent 623f16e commit 38c6480

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/rustc_hir_typeck/src/coercion.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -825,25 +825,25 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
825825
&self,
826826
a: ty::PolyFnSig<'tcx>,
827827
b: ty::PolyFnSig<'tcx>,
828-
adjustment: Option<Adjust>,
828+
a_adjustment: Option<Adjust>,
829829
) -> CoerceResult<'tcx> {
830830
let a_ty = Ty::new_fn_ptr(self.tcx, a);
831831
let b_ty = Ty::new_fn_ptr(self.tcx, b);
832832

833833
// Handle coercing `fn(..)` to `unsafe fn(..)`
834834
if a.safety().is_safe() && b.safety().is_unsafe() {
835835
let unsafe_a_ty = self.tcx.safe_to_unsafe_fn_ty(a);
836-
let adjustment = adjustment.map(|kind| Adjustment { kind, target: a_ty });
836+
let a_adjustment = a_adjustment.map(|kind| Adjustment { kind, target: a_ty });
837837

838838
self.unify_and(
839839
unsafe_a_ty,
840840
b_ty,
841-
adjustment,
841+
a_adjustment,
842842
Adjust::Pointer(PointerCoercion::UnsafeFnPointer),
843843
)
844844
} else {
845-
match adjustment {
846-
Some(adjust) => self.unify_and(a_ty, b_ty, [], adjust),
845+
match a_adjustment {
846+
Some(a_adjust) => self.unify_and(a_ty, b_ty, [], a_adjust),
847847
None => self.unify(a_ty, b_ty),
848848
}
849849
}

0 commit comments

Comments
 (0)