@@ -1484,7 +1484,7 @@ impl<'a> Parser<'a> {
1484
1484
( thin_vec ! [ ] , true )
1485
1485
}
1486
1486
} ;
1487
- VariantData :: Struct ( fields, recovered)
1487
+ VariantData :: Struct { fields, recovered }
1488
1488
} else if this. check ( & token:: OpenDelim ( Delimiter :: Parenthesis ) ) {
1489
1489
let body = match this. parse_tuple_struct_body ( ) {
1490
1490
Ok ( body) => body,
@@ -1569,7 +1569,7 @@ impl<'a> Parser<'a> {
1569
1569
class_name. span ,
1570
1570
generics. where_clause . has_where_token ,
1571
1571
) ?;
1572
- VariantData :: Struct ( fields, recovered)
1572
+ VariantData :: Struct { fields, recovered }
1573
1573
}
1574
1574
// No `where` so: `struct Foo<T>;`
1575
1575
} else if self . eat ( & token:: Semi ) {
@@ -1581,7 +1581,7 @@ impl<'a> Parser<'a> {
1581
1581
class_name. span ,
1582
1582
generics. where_clause . has_where_token ,
1583
1583
) ?;
1584
- VariantData :: Struct ( fields, recovered)
1584
+ VariantData :: Struct { fields, recovered }
1585
1585
// Tuple-style struct definition with optional where-clause.
1586
1586
} else if self . token == token:: OpenDelim ( Delimiter :: Parenthesis ) {
1587
1587
let body = VariantData :: Tuple ( self . parse_tuple_struct_body ( ) ?, DUMMY_NODE_ID ) ;
@@ -1610,14 +1610,14 @@ impl<'a> Parser<'a> {
1610
1610
class_name. span ,
1611
1611
generics. where_clause . has_where_token ,
1612
1612
) ?;
1613
- VariantData :: Struct ( fields, recovered)
1613
+ VariantData :: Struct { fields, recovered }
1614
1614
} else if self . token == token:: OpenDelim ( Delimiter :: Brace ) {
1615
1615
let ( fields, recovered) = self . parse_record_struct_body (
1616
1616
"union" ,
1617
1617
class_name. span ,
1618
1618
generics. where_clause . has_where_token ,
1619
1619
) ?;
1620
- VariantData :: Struct ( fields, recovered)
1620
+ VariantData :: Struct { fields, recovered }
1621
1621
} else {
1622
1622
let token_str = super :: token_descr ( & self . token ) ;
1623
1623
let msg = format ! ( "expected `where` or `{{` after union name, found {token_str}" ) ;
0 commit comments