From 0b9e462ab0c6d74fd0bb34d9b9101132373e65a3 Mon Sep 17 00:00:00 2001 From: DJMcNab <36049421+DJMcNab@users.noreply.github.com> Date: Sat, 12 Jan 2019 15:42:12 +0000 Subject: Fix handling of attributes in positional field lists --- crates/ra_syntax/src/grammar/items/nominal.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crates/ra_syntax/src/grammar/items') 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) { } while !p.at(R_PAREN) && !p.at(EOF) { let m = p.start(); + // test pos_field_attrs + // struct S ( + // #[serde(with = "url_serde")] + // pub Uri, + // ); + // + // enum S { + // Uri(#[serde(with = "url_serde")] Uri), + // } + attributes::outer_attributes(p); opt_visibility(p); if !p.at_ts(types::TYPE_FIRST) { p.error("expected a type"); -- cgit v1.2.3