aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests/data/parser/inline
diff options
context:
space:
mode:
authorVille Penttinen <[email protected]>2019-02-17 20:19:21 +0000
committerVille Penttinen <[email protected]>2019-02-17 21:32:10 +0000
commit58d14bcaf70662506e1a289494365d976b40fc4e (patch)
treec67fd94ddc80df9dce459f4cdc526d89e4284e99 /crates/ra_syntax/tests/data/parser/inline
parenta725dd4f7ac2b88541189f0f726ce86876c36add (diff)
Enable parsing attributes for generic lifetimes and type parameters
Diffstat (limited to 'crates/ra_syntax/tests/data/parser/inline')
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs2
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt61
2 files changed, 63 insertions, 0 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs
new file mode 100644
index 000000000..e8fdf741f
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.rs
@@ -0,0 +1,2 @@
1fn foo<#[derive(Lifetime)] 'a, #[derive(Type)] T>(_: &'a T) {
2}
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt
new file mode 100644
index 000000000..6a6aa89e8
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt
@@ -0,0 +1,61 @@
1SOURCE_FILE@[0; 64)
2 FN_DEF@[0; 63)
3 FN_KW@[0; 2)
4 WHITESPACE@[2; 3)
5 NAME@[3; 6)
6 IDENT@[3; 6) "foo"
7 TYPE_PARAM_LIST@[6; 49)
8 L_ANGLE@[6; 7)
9 LIFETIME_PARAM@[7; 29)
10 ATTR@[7; 26)
11 POUND@[7; 8)
12 TOKEN_TREE@[8; 26)
13 L_BRACK@[8; 9)
14 IDENT@[9; 15) "derive"
15 TOKEN_TREE@[15; 25)
16 L_PAREN@[15; 16)
17 IDENT@[16; 24) "Lifetime"
18 R_PAREN@[24; 25)
19 R_BRACK@[25; 26)
20 WHITESPACE@[26; 27)
21 LIFETIME@[27; 29) "'a"
22 COMMA@[29; 30)
23 WHITESPACE@[30; 31)
24 TYPE_PARAM@[31; 48)
25 ATTR@[31; 46)
26 POUND@[31; 32)
27 TOKEN_TREE@[32; 46)
28 L_BRACK@[32; 33)
29 IDENT@[33; 39) "derive"
30 TOKEN_TREE@[39; 45)
31 L_PAREN@[39; 40)
32 IDENT@[40; 44) "Type"
33 R_PAREN@[44; 45)
34 R_BRACK@[45; 46)
35 WHITESPACE@[46; 47)
36 NAME@[47; 48)
37 IDENT@[47; 48) "T"
38 R_ANGLE@[48; 49)
39 PARAM_LIST@[49; 59)
40 L_PAREN@[49; 50)
41 PARAM@[50; 58)
42 PLACEHOLDER_PAT@[50; 51)
43 UNDERSCORE@[50; 51)
44 COLON@[51; 52)
45 WHITESPACE@[52; 53)
46 REFERENCE_TYPE@[53; 58)
47 AMP@[53; 54)
48 LIFETIME@[54; 56) "'a"
49 WHITESPACE@[56; 57)
50 PATH_TYPE@[57; 58)
51 PATH@[57; 58)
52 PATH_SEGMENT@[57; 58)
53 NAME_REF@[57; 58)
54 IDENT@[57; 58) "T"
55 R_PAREN@[58; 59)
56 WHITESPACE@[59; 60)
57 BLOCK@[60; 63)
58 L_CURLY@[60; 61)
59 WHITESPACE@[61; 62)
60 R_CURLY@[62; 63)
61 WHITESPACE@[63; 64)