aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar
diff options
context:
space:
mode:
authorDJMcNab <[email protected]>2019-01-12 15:42:12 +0000
committerDJMcNab <[email protected]>2019-01-12 15:42:12 +0000
commit0b9e462ab0c6d74fd0bb34d9b9101132373e65a3 (patch)
treeed129448fca6419712ce583d47c0520642560ecc /crates/ra_syntax/src/grammar
parente9e397e705ad0bec9775067b10109e35ebefc493 (diff)
Fix handling of attributes in positional field lists
Diffstat (limited to 'crates/ra_syntax/src/grammar')
-rw-r--r--crates/ra_syntax/src/grammar/items/nominal.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/grammar/items/nominal.rs b/crates/ra_syntax/src/grammar/items/nominal.rs
index 495462ca7..0784fb7b1 100644
--- a/crates/ra_syntax/src/grammar/items/nominal.rs
+++ b/crates/ra_syntax/src/grammar/items/nominal.rs
@@ -140,6 +140,16 @@ fn pos_field_list(p: &mut Parser) {
140 } 140 }
141 while !p.at(R_PAREN) && !p.at(EOF) { 141 while !p.at(R_PAREN) && !p.at(EOF) {
142 let m = p.start(); 142 let m = p.start();
143 // test pos_field_attrs
144 // struct S (
145 // #[serde(with = "url_serde")]
146 // pub Uri,
147 // );
148 //
149 // enum S {
150 // Uri(#[serde(with = "url_serde")] Uri),
151 // }
152 attributes::outer_attributes(p);
143 opt_visibility(p); 153 opt_visibility(p);
144 if !p.at_ts(types::TYPE_FIRST) { 154 if !p.at_ts(types::TYPE_FIRST) {
145 p.error("expected a type"); 155 p.error("expected a type");