@@ -48,7 +48,7 @@ pub enum BindingMode {
4848}
4949
5050#[ derive( Clone , Debug ) ]
51- pub struct FieldPattern < ' tcx > {
51+ pub struct FieldPat < ' tcx > {
5252 pub field : Field ,
5353 pub pattern : Pattern < ' tcx > ,
5454}
@@ -140,13 +140,13 @@ pub enum PatternKind<'tcx> {
140140 adt_def : & ' tcx AdtDef ,
141141 substs : SubstsRef < ' tcx > ,
142142 variant_index : VariantIdx ,
143- subpatterns : Vec < FieldPattern < ' tcx > > ,
143+ subpatterns : Vec < FieldPat < ' tcx > > ,
144144 } ,
145145
146146 /// `(...)`, `Foo(...)`, `Foo{...}`, or `Foo`, where `Foo` is a variant name from an ADT with
147147 /// a single variant.
148148 Leaf {
149- subpatterns : Vec < FieldPattern < ' tcx > > ,
149+ subpatterns : Vec < FieldPat < ' tcx > > ,
150150 } ,
151151
152152 /// `box P`, `&P`, `&mut P`, etc.
@@ -578,7 +578,7 @@ impl<'a, 'tcx> PatternContext<'a, 'tcx> {
578578 let subpatterns =
579579 subpatterns. iter ( )
580580 . enumerate_and_adjust ( tys. len ( ) , ddpos)
581- . map ( |( i, subpattern) | FieldPattern {
581+ . map ( |( i, subpattern) | FieldPat {
582582 field : Field :: new ( i) ,
583583 pattern : self . lower_pattern ( subpattern)
584584 } )
@@ -650,7 +650,7 @@ impl<'a, 'tcx> PatternContext<'a, 'tcx> {
650650 let subpatterns =
651651 subpatterns. iter ( )
652652 . enumerate_and_adjust ( variant_def. fields . len ( ) , ddpos)
653- . map ( |( i, field) | FieldPattern {
653+ . map ( |( i, field) | FieldPat {
654654 field : Field :: new ( i) ,
655655 pattern : self . lower_pattern ( field) ,
656656 } )
@@ -664,7 +664,7 @@ impl<'a, 'tcx> PatternContext<'a, 'tcx> {
664664 let subpatterns =
665665 fields. iter ( )
666666 . map ( |field| {
667- FieldPattern {
667+ FieldPat {
668668 field : Field :: new ( self . tcx . field_index ( field. hir_id ,
669669 self . tables ) ) ,
670670 pattern : self . lower_pattern ( & field. pat ) ,
@@ -772,7 +772,7 @@ impl<'a, 'tcx> PatternContext<'a, 'tcx> {
772772 hir_id : hir:: HirId ,
773773 span : Span ,
774774 ty : Ty < ' tcx > ,
775- subpatterns : Vec < FieldPattern < ' tcx > > ,
775+ subpatterns : Vec < FieldPat < ' tcx > > ,
776776 ) -> PatternKind < ' tcx > {
777777 let res = match res {
778778 Res :: Def ( DefKind :: Ctor ( CtorOf :: Variant , ..) , variant_ctor_id) => {
@@ -1069,7 +1069,7 @@ impl<'a, 'tcx> PatternContext<'a, 'tcx> {
10691069 let mut adt_subpatterns = |n, variant_opt| {
10701070 ( 0 ..n) . map ( |i| {
10711071 let field = Field :: new ( i) ;
1072- FieldPattern {
1072+ FieldPat {
10731073 field,
10741074 pattern : adt_subpattern ( i, variant_opt) ,
10751075 }
@@ -1361,9 +1361,9 @@ CloneImpls!{ <'tcx>
13611361 UserTypeProjection , PatternTypeProjection <' tcx>
13621362}
13631363
1364- impl < ' tcx > PatternFoldable < ' tcx > for FieldPattern < ' tcx > {
1364+ impl < ' tcx > PatternFoldable < ' tcx > for FieldPat < ' tcx > {
13651365 fn super_fold_with < F : PatternFolder < ' tcx > > ( & self , folder : & mut F ) -> Self {
1366- FieldPattern {
1366+ FieldPat {
13671367 field : self . field . fold_with ( folder) ,
13681368 pattern : self . pattern . fold_with ( folder)
13691369 }
0 commit comments