diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-21 10:12:08 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-21 10:12:08 +0100 |
commit | 7ae0bc1bd40286200f5e5b7a4d3b086312055ed5 (patch) | |
tree | ec28254cd1f8bdbdca15d1f30218abe43a383abc /crates/parser | |
parent | 70fe7a4515ebdc6222a6565cd4cd1c5fd0c77350 (diff) | |
parent | 3f7a086b4f8f4c83ba03b36dcb722b897b260e6b (diff) |
Merge #8609
8609: Parse outer atttributes for RecordPatField r=Veykril a=Veykril
Fixes #8608
bors r+
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/parser')
-rw-r--r-- | crates/parser/src/grammar/patterns.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/parser/src/grammar/patterns.rs b/crates/parser/src/grammar/patterns.rs index da71498a8..3ab347834 100644 --- a/crates/parser/src/grammar/patterns.rs +++ b/crates/parser/src/grammar/patterns.rs | |||
@@ -206,13 +206,15 @@ fn record_pat_field_list(p: &mut Parser) { | |||
206 | T![.] if p.at(T![..]) => p.bump(T![..]), | 206 | T![.] if p.at(T![..]) => p.bump(T![..]), |
207 | T!['{'] => error_block(p, "expected ident"), | 207 | T!['{'] => error_block(p, "expected ident"), |
208 | 208 | ||
209 | c => { | 209 | _ => { |
210 | let m = p.start(); | 210 | let m = p.start(); |
211 | match c { | 211 | attributes::outer_attrs(p); |
212 | match p.current() { | ||
212 | // test record_pat_field | 213 | // test record_pat_field |
213 | // fn foo() { | 214 | // fn foo() { |
214 | // let S { 0: 1 } = (); | 215 | // let S { 0: 1 } = (); |
215 | // let S { x: 1 } = (); | 216 | // let S { x: 1 } = (); |
217 | // let S { #[cfg(any())] x: 1 } = (); | ||
216 | // } | 218 | // } |
217 | IDENT | INT_NUMBER if p.nth(1) == T![:] => { | 219 | IDENT | INT_NUMBER if p.nth(1) == T![:] => { |
218 | name_ref_or_index(p); | 220 | name_ref_or_index(p); |