diff options
Diffstat (limited to 'crates/ra_parser')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index d1f27dadf..a0d5a99cb 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -452,8 +452,13 @@ pub(crate) fn named_field_list(p: &mut Parser) { | |||
452 | p.bump(); | 452 | p.bump(); |
453 | while !p.at(EOF) && !p.at(R_CURLY) { | 453 | while !p.at(EOF) && !p.at(R_CURLY) { |
454 | match p.current() { | 454 | match p.current() { |
455 | IDENT => { | 455 | // test struct_literal_field_with_attr |
456 | // fn main() { | ||
457 | // S { #[cfg(test)] field: 1 } | ||
458 | // } | ||
459 | IDENT | POUND => { | ||
456 | let m = p.start(); | 460 | let m = p.start(); |
461 | attributes::outer_attributes(p); | ||
457 | name_ref(p); | 462 | name_ref(p); |
458 | if p.eat(COLON) { | 463 | if p.eat(COLON) { |
459 | expr(p); | 464 | expr(p); |