Skip to content

Commit 2efa237

Browse files
Rename explicit_ba
1 parent 359b6af commit 2efa237

File tree

1 file changed

+4
-4
lines changed
  • compiler/rustc_hir_typeck/src

1 file changed

+4
-4
lines changed

compiler/rustc_hir_typeck/src/pat.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
724724
fn check_pat_ident(
725725
&self,
726726
pat: &'tcx Pat<'tcx>,
727-
explicit_ba: BindingMode,
727+
user_bind_annot: BindingMode,
728728
var_id: HirId,
729729
ident: Ident,
730730
sub: Option<&'tcx Pat<'tcx>>,
@@ -734,7 +734,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
734734
let PatInfo { binding_mode: def_br, top_info: ti, .. } = pat_info;
735735

736736
// Determine the binding mode...
737-
let bm = match explicit_ba {
737+
let bm = match user_bind_annot {
738738
BindingMode(ByRef::No, Mutability::Mut)
739739
if !(pat.span.at_least_rust_2024()
740740
&& self.tcx.features().mut_preserve_binding_mode_2024)
@@ -750,7 +750,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
750750
BindingMode(ByRef::No, Mutability::Mut)
751751
}
752752
BindingMode(ByRef::No, mutbl) => BindingMode(def_br, mutbl),
753-
BindingMode(ByRef::Yes(_), _) => explicit_ba,
753+
BindingMode(ByRef::Yes(_), _) => user_bind_annot,
754754
};
755755

756756
if bm.0 == ByRef::Yes(Mutability::Mut)
@@ -799,7 +799,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
799799
// If there are multiple arms, make sure they all agree on
800800
// what the type of the binding `x` ought to be.
801801
if var_id != pat.hir_id {
802-
self.check_binding_alt_eq_ty(explicit_ba, pat.span, var_id, local_ty, ti);
802+
self.check_binding_alt_eq_ty(user_bind_annot, pat.span, var_id, local_ty, ti);
803803
}
804804

805805
if let Some(p) = sub {

0 commit comments

Comments
 (0)