File tree Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -243,27 +243,20 @@ fn record_pat_field_list(p: &mut Parser) {
243
243
let m = p. start ( ) ;
244
244
p. bump ( T ! [ '{' ] ) ;
245
245
while !p. at ( EOF ) && !p. at ( T ! [ '}' ] ) {
246
+ let m = p. start ( ) ;
247
+ attributes:: outer_attrs ( p) ;
248
+
246
249
match p. current ( ) {
247
250
// A trailing `..` is *not* treated as a REST_PAT.
248
251
T ! [ . ] if p. at ( T ! [ ..] ) => {
249
- rest_pat ( p) ;
252
+ p. bump ( T ! [ ..] ) ;
253
+ m. complete ( p, REST_PAT ) ;
250
254
}
251
- T ! [ '{' ] => error_block ( p, "expected ident" ) ,
252
- T ! [ #] => {
253
- let m = p. start ( ) ;
254
- attributes:: outer_attrs ( p) ;
255
- if p. at ( T ! [ ..] ) {
256
- p. bump ( T ! [ ..] ) ;
257
- m. complete ( p, REST_PAT ) ;
258
- } else {
259
- record_pat_field ( p) ;
260
- m. complete ( p, RECORD_PAT_FIELD ) ;
261
- }
255
+ T ! [ '{' ] => {
256
+ error_block ( p, "expected ident" ) ;
257
+ m. abandon ( p) ;
262
258
}
263
-
264
259
_ => {
265
- let m = p. start ( ) ;
266
- attributes:: outer_attrs ( p) ;
267
260
record_pat_field ( p) ;
268
261
m. complete ( p, RECORD_PAT_FIELD ) ;
269
262
}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ rayon = "1"
29
29
expect-test = " 1.1"
30
30
proc-macro2 = " 1.0.8"
31
31
quote = " 1.0.2"
32
- ungrammar = " =1.14.5 "
32
+ ungrammar = " =1.14.6 "
33
33
34
34
test_utils = { path = " ../test_utils" }
35
35
sourcegen = { path = " ../sourcegen" }
You can’t perform that action at this time.
0 commit comments