diff options
Diffstat (limited to 'crates/ra_parser/src')
-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 70c71a8e1..647fedfb5 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -453,8 +453,13 @@ pub(crate) fn named_field_list(p: &mut Parser) { | |||
453 | p.bump(); | 453 | p.bump(); |
454 | while !p.at(EOF) && !p.at(R_CURLY) { | 454 | while !p.at(EOF) && !p.at(R_CURLY) { |
455 | match p.current() { | 455 | match p.current() { |
456 | IDENT => { | 456 | // test struct_literal_field_with_attr |
457 | // fn main() { | ||
458 | // S { #[cfg(test)] field: 1 } | ||
459 | // } | ||
460 | IDENT | POUND => { | ||
457 | let m = p.start(); | 461 | let m = p.start(); |
462 | attributes::outer_attributes(p); | ||
458 | name_ref(p); | 463 | name_ref(p); |
459 | if p.eat(COLON) { | 464 | if p.eat(COLON) { |
460 | expr(p); | 465 | expr(p); |