Skip to content

Commit 0e758c4

Browse files
committed
rename consider_inherited_ref_first -> consider_inherited_ref
1 parent 37bcc1c commit 0e758c4

File tree

1 file changed

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

1 file changed

+5
-5
lines changed

compiler/rustc_hir_typeck/src/pat.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ enum InheritedRefMatchRule {
241241
/// If `false`, a reference pattern is only matched against the underlying type.
242242
/// This is `false` for stable Rust and `true` for both the `ref_pat_eat_one_layer_2024` and
243243
/// `ref_pat_eat_one_layer_2024_structural` feature gates.
244-
consider_inherited_ref_first: bool,
244+
consider_inherited_ref: bool,
245245
},
246246
}
247247

@@ -268,11 +268,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
268268
} else {
269269
// Currently, matching against an inherited ref on edition 2024 is an error.
270270
// Use `EatBoth` as a fallback to be similar to stable Rust.
271-
InheritedRefMatchRule::EatBoth { consider_inherited_ref_first: false }
271+
InheritedRefMatchRule::EatBoth { consider_inherited_ref: false }
272272
}
273273
} else {
274274
InheritedRefMatchRule::EatBoth {
275-
consider_inherited_ref_first: self.tcx.features().ref_pat_eat_one_layer_2024()
275+
consider_inherited_ref: self.tcx.features().ref_pat_eat_one_layer_2024()
276276
|| self.tcx.features().ref_pat_eat_one_layer_2024_structural(),
277277
}
278278
}
@@ -2397,7 +2397,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
23972397
return expected;
23982398
}
23992399
}
2400-
InheritedRefMatchRule::EatBoth { consider_inherited_ref_first: true } => {
2400+
InheritedRefMatchRule::EatBoth { consider_inherited_ref: true } => {
24012401
// Reset binding mode on old editions
24022402
pat_info.binding_mode = ByRef::No;
24032403

@@ -2437,7 +2437,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
24372437
return expected;
24382438
}
24392439
}
2440-
InheritedRefMatchRule::EatBoth { consider_inherited_ref_first: false } => {
2440+
InheritedRefMatchRule::EatBoth { consider_inherited_ref: false } => {
24412441
// Reset binding mode on stable Rust. This will be a type error below if
24422442
// `expected` is not a reference type.
24432443
pat_info.binding_mode = ByRef::No;

0 commit comments

Comments
 (0)