diff options
author | Aleksey Kladov <[email protected]> | 2018-08-07 22:53:03 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-07 22:53:03 +0100 |
commit | 64a65a4ff40e0c9b6d9453af79bba013afde2ffa (patch) | |
tree | 9b8b488b35fae3f5497f86d67c18ed5fd63d5c7f /tests/data | |
parent | 2fb854ccdae6f1f12b60441e5c3b283bdc81fb0a (diff) |
trait items
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/parser/inline/0090_trait_item_items.rs | 6 | ||||
-rw-r--r-- | tests/data/parser/inline/0090_trait_item_items.txt | 67 | ||||
-rw-r--r-- | tests/data/parser/inline/0091_fn_decl.rs | 1 | ||||
-rw-r--r-- | tests/data/parser/inline/0091_fn_decl.txt | 21 |
4 files changed, 95 insertions, 0 deletions
diff --git a/tests/data/parser/inline/0090_trait_item_items.rs b/tests/data/parser/inline/0090_trait_item_items.rs new file mode 100644 index 000000000..a5ec3239f --- /dev/null +++ b/tests/data/parser/inline/0090_trait_item_items.rs | |||
@@ -0,0 +1,6 @@ | |||
1 | impl F { | ||
2 | type A: Clone; | ||
3 | const B: i32; | ||
4 | fn foo() {} | ||
5 | fn bar(&self); | ||
6 | } | ||
diff --git a/tests/data/parser/inline/0090_trait_item_items.txt b/tests/data/parser/inline/0090_trait_item_items.txt new file mode 100644 index 000000000..2350bbe82 --- /dev/null +++ b/tests/data/parser/inline/0090_trait_item_items.txt | |||
@@ -0,0 +1,67 @@ | |||
1 | FILE@[0; 83) | ||
2 | IMPL_ITEM@[0; 82) | ||
3 | IMPL_KW@[0; 4) | ||
4 | WHITESPACE@[4; 5) | ||
5 | PATH_TYPE@[5; 6) | ||
6 | PATH@[5; 6) | ||
7 | PATH_SEGMENT@[5; 6) | ||
8 | NAME_REF@[5; 6) | ||
9 | IDENT@[5; 6) "F" | ||
10 | WHITESPACE@[6; 7) | ||
11 | L_CURLY@[7; 8) | ||
12 | WHITESPACE@[8; 13) | ||
13 | TYPE_ITEM@[13; 27) | ||
14 | TYPE_KW@[13; 17) | ||
15 | WHITESPACE@[17; 18) | ||
16 | NAME@[18; 19) | ||
17 | IDENT@[18; 19) "A" | ||
18 | COLON@[19; 20) | ||
19 | WHITESPACE@[20; 21) | ||
20 | PATH@[21; 26) | ||
21 | PATH_SEGMENT@[21; 26) | ||
22 | NAME_REF@[21; 26) | ||
23 | IDENT@[21; 26) "Clone" | ||
24 | SEMI@[26; 27) | ||
25 | WHITESPACE@[27; 32) | ||
26 | CONST_ITEM@[32; 45) | ||
27 | CONST_KW@[32; 37) | ||
28 | WHITESPACE@[37; 38) | ||
29 | NAME@[38; 39) | ||
30 | IDENT@[38; 39) "B" | ||
31 | COLON@[39; 40) | ||
32 | WHITESPACE@[40; 41) | ||
33 | PATH_TYPE@[41; 44) | ||
34 | PATH@[41; 44) | ||
35 | PATH_SEGMENT@[41; 44) | ||
36 | NAME_REF@[41; 44) | ||
37 | IDENT@[41; 44) "i32" | ||
38 | SEMI@[44; 45) | ||
39 | WHITESPACE@[45; 50) | ||
40 | FN_ITEM@[50; 61) | ||
41 | FN_KW@[50; 52) | ||
42 | WHITESPACE@[52; 53) | ||
43 | NAME@[53; 56) | ||
44 | IDENT@[53; 56) "foo" | ||
45 | PARAM_LIST@[56; 58) | ||
46 | L_PAREN@[56; 57) | ||
47 | R_PAREN@[57; 58) | ||
48 | WHITESPACE@[58; 59) | ||
49 | BLOCK_EXPR@[59; 61) | ||
50 | L_CURLY@[59; 60) | ||
51 | R_CURLY@[60; 61) | ||
52 | WHITESPACE@[61; 66) | ||
53 | FN_ITEM@[66; 80) | ||
54 | FN_KW@[66; 68) | ||
55 | WHITESPACE@[68; 69) | ||
56 | NAME@[69; 72) | ||
57 | IDENT@[69; 72) "bar" | ||
58 | PARAM_LIST@[72; 79) | ||
59 | L_PAREN@[72; 73) | ||
60 | SELF_PARAM@[73; 78) | ||
61 | AMP@[73; 74) | ||
62 | SELF_KW@[74; 78) | ||
63 | R_PAREN@[78; 79) | ||
64 | SEMI@[79; 80) | ||
65 | WHITESPACE@[80; 81) | ||
66 | R_CURLY@[81; 82) | ||
67 | WHITESPACE@[82; 83) | ||
diff --git a/tests/data/parser/inline/0091_fn_decl.rs b/tests/data/parser/inline/0091_fn_decl.rs new file mode 100644 index 000000000..c9f74f7f5 --- /dev/null +++ b/tests/data/parser/inline/0091_fn_decl.rs | |||
@@ -0,0 +1 @@ | |||
trait T { fn foo(); } | |||
diff --git a/tests/data/parser/inline/0091_fn_decl.txt b/tests/data/parser/inline/0091_fn_decl.txt new file mode 100644 index 000000000..e5e5bfc08 --- /dev/null +++ b/tests/data/parser/inline/0091_fn_decl.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | FILE@[0; 22) | ||
2 | TRAIT_ITEM@[0; 21) | ||
3 | TRAIT_KW@[0; 5) | ||
4 | WHITESPACE@[5; 6) | ||
5 | NAME@[6; 7) | ||
6 | IDENT@[6; 7) "T" | ||
7 | WHITESPACE@[7; 8) | ||
8 | L_CURLY@[8; 9) | ||
9 | WHITESPACE@[9; 10) | ||
10 | FN_ITEM@[10; 19) | ||
11 | FN_KW@[10; 12) | ||
12 | WHITESPACE@[12; 13) | ||
13 | NAME@[13; 16) | ||
14 | IDENT@[13; 16) "foo" | ||
15 | PARAM_LIST@[16; 18) | ||
16 | L_PAREN@[16; 17) | ||
17 | R_PAREN@[17; 18) | ||
18 | SEMI@[18; 19) | ||
19 | WHITESPACE@[19; 20) | ||
20 | R_CURLY@[20; 21) | ||
21 | WHITESPACE@[21; 22) | ||