@@ -241,7 +241,7 @@ enum InheritedRefMatchRule {
241
241
/// If `false`, a reference pattern is only matched against the underlying type.
242
242
/// This is `false` for stable Rust and `true` for both the `ref_pat_eat_one_layer_2024` and
243
243
/// `ref_pat_eat_one_layer_2024_structural` feature gates.
244
- consider_inherited_ref_first : bool ,
244
+ consider_inherited_ref : bool ,
245
245
} ,
246
246
}
247
247
@@ -268,11 +268,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
268
268
} else {
269
269
// Currently, matching against an inherited ref on edition 2024 is an error.
270
270
// 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 }
272
272
}
273
273
} else {
274
274
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 ( )
276
276
|| self . tcx . features ( ) . ref_pat_eat_one_layer_2024_structural ( ) ,
277
277
}
278
278
}
@@ -2397,7 +2397,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
2397
2397
return expected;
2398
2398
}
2399
2399
}
2400
- InheritedRefMatchRule :: EatBoth { consider_inherited_ref_first : true } => {
2400
+ InheritedRefMatchRule :: EatBoth { consider_inherited_ref : true } => {
2401
2401
// Reset binding mode on old editions
2402
2402
pat_info. binding_mode = ByRef :: No ;
2403
2403
@@ -2437,7 +2437,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
2437
2437
return expected;
2438
2438
}
2439
2439
}
2440
- InheritedRefMatchRule :: EatBoth { consider_inherited_ref_first : false } => {
2440
+ InheritedRefMatchRule :: EatBoth { consider_inherited_ref : false } => {
2441
2441
// Reset binding mode on stable Rust. This will be a type error below if
2442
2442
// `expected` is not a reference type.
2443
2443
pat_info. binding_mode = ByRef :: No ;
0 commit comments