about summary refs log tree commit diff
diff options
context:
space:
mode:
authordianne <diannes.gm@gmail.com>2025-02-16 17:04:26 -0800
committerdianne <diannes.gm@gmail.com>2025-02-18 18:00:17 -0800
commit0e758c4ba6d9165106f6db768e23f01fabfd2d8c (patch)
tree47bddf93f5e51cd44f8140f712c6422433605d80
parent37bcc1cc5ccd6b87257388e11a7573df61ebc990 (diff)
downloadrust-0e758c4ba6d9165106f6db768e23f01fabfd2d8c.tar.gz
rust-0e758c4ba6d9165106f6db768e23f01fabfd2d8c.zip
rename `consider_inherited_ref_first` -> `consider_inherited_ref`
-rw-r--r--compiler/rustc_hir_typeck/src/pat.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_hir_typeck/src/pat.rs b/compiler/rustc_hir_typeck/src/pat.rs
index 40df87188cd..9456247de88 100644
--- a/compiler/rustc_hir_typeck/src/pat.rs
+++ b/compiler/rustc_hir_typeck/src/pat.rs
@@ -241,7 +241,7 @@ enum InheritedRefMatchRule {
         /// If `false`, a reference pattern is only matched against the underlying type.
         /// This is `false` for stable Rust and `true` for both the `ref_pat_eat_one_layer_2024` and
         /// `ref_pat_eat_one_layer_2024_structural` feature gates.
-        consider_inherited_ref_first: bool,
+        consider_inherited_ref: bool,
     },
 }
 
@@ -268,11 +268,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             } else {
                 // Currently, matching against an inherited ref on edition 2024 is an error.
                 // Use `EatBoth` as a fallback to be similar to stable Rust.
-                InheritedRefMatchRule::EatBoth { consider_inherited_ref_first: false }
+                InheritedRefMatchRule::EatBoth { consider_inherited_ref: false }
             }
         } else {
             InheritedRefMatchRule::EatBoth {
-                consider_inherited_ref_first: self.tcx.features().ref_pat_eat_one_layer_2024()
+                consider_inherited_ref: self.tcx.features().ref_pat_eat_one_layer_2024()
                     || self.tcx.features().ref_pat_eat_one_layer_2024_structural(),
             }
         }
@@ -2397,7 +2397,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                         return expected;
                     }
                 }
-                InheritedRefMatchRule::EatBoth { consider_inherited_ref_first: true } => {
+                InheritedRefMatchRule::EatBoth { consider_inherited_ref: true } => {
                     // Reset binding mode on old editions
                     pat_info.binding_mode = ByRef::No;
 
@@ -2437,7 +2437,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                         return expected;
                     }
                 }
-                InheritedRefMatchRule::EatBoth { consider_inherited_ref_first: false } => {
+                InheritedRefMatchRule::EatBoth { consider_inherited_ref: false } => {
                     // Reset binding mode on stable Rust. This will be a type error below if
                     // `expected` is not a reference type.
                     pat_info.binding_mode = ByRef::No;