From eda52cbc348f37c1ae4391da901b2d605e161716 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 16 Aug 2018 13:20:59 +0300 Subject: allow field attrs --- .../tests/data/parser/inline/0103_field_attrs.rs | 4 +++ .../tests/data/parser/inline/0103_field_attrs.txt | 41 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 crates/libsyntax2/tests/data/parser/inline/0103_field_attrs.rs create mode 100644 crates/libsyntax2/tests/data/parser/inline/0103_field_attrs.txt (limited to 'crates/libsyntax2/tests') diff --git a/crates/libsyntax2/tests/data/parser/inline/0103_field_attrs.rs b/crates/libsyntax2/tests/data/parser/inline/0103_field_attrs.rs new file mode 100644 index 000000000..4744d8ac0 --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/inline/0103_field_attrs.rs @@ -0,0 +1,4 @@ +struct S { + #[serde(with = "url_serde")] + pub uri: Uri, +} diff --git a/crates/libsyntax2/tests/data/parser/inline/0103_field_attrs.txt b/crates/libsyntax2/tests/data/parser/inline/0103_field_attrs.txt new file mode 100644 index 000000000..f4e2d9716 --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/inline/0103_field_attrs.txt @@ -0,0 +1,41 @@ +FILE@[0; 64) + STRUCT_DEF@[0; 63) + STRUCT_KW@[0; 6) + WHITESPACE@[6; 7) + NAME@[7; 8) + IDENT@[7; 8) "S" + WHITESPACE@[8; 9) + L_CURLY@[9; 10) + WHITESPACE@[10; 15) + NAMED_FIELD@[15; 60) + ATTR@[15; 43) + POUND@[15; 16) + TOKEN_TREE@[16; 43) + L_BRACK@[16; 17) + IDENT@[17; 22) "serde" + TOKEN_TREE@[22; 42) + L_PAREN@[22; 23) + IDENT@[23; 27) "with" + WHITESPACE@[27; 28) + EQ@[28; 29) + WHITESPACE@[29; 30) + STRING@[30; 41) + R_PAREN@[41; 42) + R_BRACK@[42; 43) + WHITESPACE@[43; 48) + VISIBILITY@[48; 51) + PUB_KW@[48; 51) + WHITESPACE@[51; 52) + NAME@[52; 55) + IDENT@[52; 55) "uri" + COLON@[55; 56) + WHITESPACE@[56; 57) + PATH_TYPE@[57; 60) + PATH@[57; 60) + PATH_SEGMENT@[57; 60) + NAME_REF@[57; 60) + IDENT@[57; 60) "Uri" + COMMA@[60; 61) + WHITESPACE@[61; 62) + R_CURLY@[62; 63) + WHITESPACE@[63; 64) -- cgit v1.2.3