diff options
| author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-26 10:23:28 +0000 |
|---|---|---|
| committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-26 10:23:28 +0000 |
| commit | 2acaa92c93bcd54d97221d0cede8780ff817476e (patch) | |
| tree | cb92ecad2475f772d3e392d6cb43ccb84fa50acf /crates/ra_syntax/tests/data/parser/inline | |
| parent | 8b6dea348fa02a7ce8107a1e73917f0597f2a91d (diff) | |
| parent | e28bd099d68ee124280eeadefe48c1f2e0ff6c17 (diff) | |
| download | rust-2acaa92c93bcd54d97221d0cede8780ff817476e.tar.gz rust-2acaa92c93bcd54d97221d0cede8780ff817476e.zip | |
Merge #660
660: Support macro calls in type position r=matklad a=regiontog A [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=fdc6dd4ddaece92a72fa2a292b75e27c) demonstrating the syntax in question. Co-authored-by: Erlend Tobiassen <erlend.tobiassen@gmail.com>
Diffstat (limited to 'crates/ra_syntax/tests/data/parser/inline')
| -rw-r--r-- | crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.rs | 2 | ||||
| -rw-r--r-- | crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.txt | 43 |
2 files changed, 45 insertions, 0 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.rs new file mode 100644 index 00000000000..edb470c8999 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.rs @@ -0,0 +1,2 @@ +type A = foo!(); +type B = crate::foo!(); diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.txt new file mode 100644 index 00000000000..b2d95451c97 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.txt @@ -0,0 +1,43 @@ +SOURCE_FILE@[0; 41) + TYPE_DEF@[0; 16) + TYPE_KW@[0; 4) + WHITESPACE@[4; 5) + NAME@[5; 6) + IDENT@[5; 6) "A" + WHITESPACE@[6; 7) + EQ@[7; 8) + WHITESPACE@[8; 9) + MACRO_CALL@[9; 15) + PATH@[9; 12) + PATH_SEGMENT@[9; 12) + NAME_REF@[9; 12) + IDENT@[9; 12) "foo" + EXCL@[12; 13) + TOKEN_TREE@[13; 15) + L_PAREN@[13; 14) + R_PAREN@[14; 15) + SEMI@[15; 16) + WHITESPACE@[16; 17) + TYPE_DEF@[17; 40) + TYPE_KW@[17; 21) + WHITESPACE@[21; 22) + NAME@[22; 23) + IDENT@[22; 23) "B" + WHITESPACE@[23; 24) + EQ@[24; 25) + WHITESPACE@[25; 26) + MACRO_CALL@[26; 39) + PATH@[26; 36) + PATH@[26; 31) + PATH_SEGMENT@[26; 31) + CRATE_KW@[26; 31) + COLONCOLON@[31; 33) + PATH_SEGMENT@[33; 36) + NAME_REF@[33; 36) + IDENT@[33; 36) "foo" + EXCL@[36; 37) + TOKEN_TREE@[37; 39) + L_PAREN@[37; 38) + R_PAREN@[38; 39) + SEMI@[39; 40) + WHITESPACE@[40; 41) |
