Skip to content

Commit 7ab55ed

Browse files
committed
rename fn param to clarify its adjustments on a
1 parent 254bed0 commit 7ab55ed

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
@@ -771,25 +771,25 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
771771
&self,
772772
a: ty::PolyFnSig<'tcx>,
773773
b: ty::PolyFnSig<'tcx>,
774-
adjustment: Option<Adjust>,
774+
a_adjustment: Option<Adjust>,
775775
) -> CoerceResult<'tcx> {
776776
let a_ty = Ty::new_fn_ptr(self.tcx, a);
777777
let b_ty = Ty::new_fn_ptr(self.tcx, b);
778778

779779
// Handle coercing `fn(..)` to `unsafe fn(..)`
780780
if a.safety().is_safe() && b.safety().is_unsafe() {
781781
let unsafe_a_ty = self.tcx.safe_to_unsafe_fn_ty(a);
782-
let adjustment = adjustment.map(|kind| Adjustment { kind, target: a_ty });
782+
let a_adjustment = a_adjustment.map(|kind| Adjustment { kind, target: a_ty });
783783

784784
self.unify_and(
785785
unsafe_a_ty,
786786
b_ty,
787-
adjustment,
787+
a_adjustment,
788788
Adjust::Pointer(PointerCoercion::UnsafeFnPointer),
789789
)
790790
} else {
791-
match adjustment {
792-
Some(adjust) => self.unify_and(a_ty, b_ty, [], adjust),
791+
match a_adjustment {
792+
Some(a_adjust) => self.unify_and(a_ty, b_ty, [], a_adjust),
793793
None => self.unify(a_ty, b_ty),
794794
}
795795
}

0 commit comments

Comments
 (0)