@@ -877,7 +877,7 @@ impl Pat {
877
877
match self . node {
878
878
PatKind :: Binding ( .., Some ( ref p) ) => p. walk_ ( it) ,
879
879
PatKind :: Struct ( _, ref fields, _) => {
880
- fields. iter ( ) . all ( |field| field. node . pat . walk_ ( it) )
880
+ fields. iter ( ) . all ( |field| field. pat . walk_ ( it) )
881
881
}
882
882
PatKind :: TupleStruct ( _, ref s, _) | PatKind :: Tuple ( ref s, _) => {
883
883
s. iter ( ) . all ( |p| p. walk_ ( it) )
@@ -923,6 +923,7 @@ pub struct FieldPat {
923
923
/// The pattern the field is destructured to.
924
924
pub pat : P < Pat > ,
925
925
pub is_shorthand : bool ,
926
+ pub span : Span ,
926
927
}
927
928
928
929
/// Explicit binding annotations given in the HIR for a binding. Note
@@ -968,7 +969,7 @@ pub enum PatKind {
968
969
969
970
/// A struct or struct variant pattern (e.g., `Variant {x, y, ..}`).
970
971
/// The `bool` is `true` in the presence of a `..`.
971
- Struct ( QPath , HirVec < Spanned < FieldPat > > , bool ) ,
972
+ Struct ( QPath , HirVec < FieldPat > , bool ) ,
972
973
973
974
/// A tuple struct/variant pattern `Variant(x, y, .., z)`.
974
975
/// If the `..` pattern fragment is present, then `Option<usize>` denotes its position.
0 commit comments