@@ -877,7 +877,7 @@ impl Pat {
877877 match self . node {
878878 PatKind :: Binding ( .., Some ( ref p) ) => p. walk_ ( it) ,
879879 PatKind :: Struct ( _, ref fields, _) => {
880- fields. iter ( ) . all ( |field| field. node . pat . walk_ ( it) )
880+ fields. iter ( ) . all ( |field| field. pat . walk_ ( it) )
881881 }
882882 PatKind :: TupleStruct ( _, ref s, _) | PatKind :: Tuple ( ref s, _) => {
883883 s. iter ( ) . all ( |p| p. walk_ ( it) )
@@ -923,6 +923,7 @@ pub struct FieldPat {
923923 /// The pattern the field is destructured to.
924924 pub pat : P < Pat > ,
925925 pub is_shorthand : bool ,
926+ pub span : Span ,
926927}
927928
928929/// Explicit binding annotations given in the HIR for a binding. Note
@@ -968,7 +969,7 @@ pub enum PatKind {
968969
969970 /// A struct or struct variant pattern (e.g., `Variant {x, y, ..}`).
970971 /// The `bool` is `true` in the presence of a `..`.
971- Struct ( QPath , HirVec < Spanned < FieldPat > > , bool ) ,
972+ Struct ( QPath , HirVec < FieldPat > , bool ) ,
972973
973974 /// A tuple struct/variant pattern `Variant(x, y, .., z)`.
974975 /// If the `..` pattern fragment is present, then `Option<usize>` denotes its position.
0 commit comments