@@ -1588,7 +1588,7 @@ impl<'a> Parser<'a> {
1588
1588
( thin_vec ! [ ] , Recovered :: Yes ( guar) )
1589
1589
}
1590
1590
} ;
1591
- VariantData :: Struct { fields, recovered : recovered . into ( ) }
1591
+ VariantData :: Struct { fields, recovered }
1592
1592
} else if this. check ( & token:: OpenDelim ( Delimiter :: Parenthesis ) ) {
1593
1593
let body = match this. parse_tuple_struct_body ( ) {
1594
1594
Ok ( body) => body,
@@ -1672,7 +1672,7 @@ impl<'a> Parser<'a> {
1672
1672
class_name. span ,
1673
1673
generics. where_clause . has_where_token ,
1674
1674
) ?;
1675
- VariantData :: Struct { fields, recovered : recovered . into ( ) }
1675
+ VariantData :: Struct { fields, recovered }
1676
1676
}
1677
1677
// No `where` so: `struct Foo<T>;`
1678
1678
} else if self . eat ( & token:: Semi ) {
@@ -1684,7 +1684,7 @@ impl<'a> Parser<'a> {
1684
1684
class_name. span ,
1685
1685
generics. where_clause . has_where_token ,
1686
1686
) ?;
1687
- VariantData :: Struct { fields, recovered : recovered . into ( ) }
1687
+ VariantData :: Struct { fields, recovered }
1688
1688
// Tuple-style struct definition with optional where-clause.
1689
1689
} else if self . token == token:: OpenDelim ( Delimiter :: Parenthesis ) {
1690
1690
let body = VariantData :: Tuple ( self . parse_tuple_struct_body ( ) ?, DUMMY_NODE_ID ) ;
@@ -1713,14 +1713,14 @@ impl<'a> Parser<'a> {
1713
1713
class_name. span ,
1714
1714
generics. where_clause . has_where_token ,
1715
1715
) ?;
1716
- VariantData :: Struct { fields, recovered : recovered . into ( ) }
1716
+ VariantData :: Struct { fields, recovered }
1717
1717
} else if self . token == token:: OpenDelim ( Delimiter :: Brace ) {
1718
1718
let ( fields, recovered) = self . parse_record_struct_body (
1719
1719
"union" ,
1720
1720
class_name. span ,
1721
1721
generics. where_clause . has_where_token ,
1722
1722
) ?;
1723
- VariantData :: Struct { fields, recovered : recovered . into ( ) }
1723
+ VariantData :: Struct { fields, recovered }
1724
1724
} else {
1725
1725
let token_str = super :: token_descr ( & self . token ) ;
1726
1726
let msg = format ! ( "expected `where` or `{{` after union name, found {token_str}" ) ;
0 commit comments