diff options
Diffstat (limited to 'crates/ra_syntax/test_data')
4 files changed, 186 insertions, 0 deletions
diff --git a/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rs b/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rs new file mode 100644 index 000000000..0d3f5722a --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.rs | |||
@@ -0,0 +1,5 @@ | |||
1 | fn a() -> Foo<bar::Baz> {} | ||
2 | |||
3 | fn b(_: impl FnMut(x::Y)) {} | ||
4 | |||
5 | fn c(_: impl FnMut(&x::Y)) {} | ||
diff --git a/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.txt b/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.txt new file mode 100644 index 000000000..7e1af254c --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0054_qual_path_in_type_arg.txt | |||
@@ -0,0 +1,126 @@ | |||
1 | SOURCE_FILE@[0; 88) | ||
2 | FN_DEF@[0; 26) | ||
3 | FN_KW@[0; 2) "fn" | ||
4 | WHITESPACE@[2; 3) " " | ||
5 | NAME@[3; 4) | ||
6 | IDENT@[3; 4) "a" | ||
7 | PARAM_LIST@[4; 6) | ||
8 | L_PAREN@[4; 5) "(" | ||
9 | R_PAREN@[5; 6) ")" | ||
10 | WHITESPACE@[6; 7) " " | ||
11 | RET_TYPE@[7; 23) | ||
12 | THIN_ARROW@[7; 9) "->" | ||
13 | WHITESPACE@[9; 10) " " | ||
14 | PATH_TYPE@[10; 23) | ||
15 | PATH@[10; 23) | ||
16 | PATH_SEGMENT@[10; 23) | ||
17 | NAME_REF@[10; 13) | ||
18 | IDENT@[10; 13) "Foo" | ||
19 | TYPE_ARG_LIST@[13; 23) | ||
20 | L_ANGLE@[13; 14) "<" | ||
21 | TYPE_ARG@[14; 22) | ||
22 | PATH_TYPE@[14; 22) | ||
23 | PATH@[14; 22) | ||
24 | PATH@[14; 17) | ||
25 | PATH_SEGMENT@[14; 17) | ||
26 | NAME_REF@[14; 17) | ||
27 | IDENT@[14; 17) "bar" | ||
28 | COLONCOLON@[17; 19) "::" | ||
29 | PATH_SEGMENT@[19; 22) | ||
30 | NAME_REF@[19; 22) | ||
31 | IDENT@[19; 22) "Baz" | ||
32 | R_ANGLE@[22; 23) ">" | ||
33 | WHITESPACE@[23; 24) " " | ||
34 | BLOCK_EXPR@[24; 26) | ||
35 | BLOCK@[24; 26) | ||
36 | L_CURLY@[24; 25) "{" | ||
37 | R_CURLY@[25; 26) "}" | ||
38 | WHITESPACE@[26; 28) "\n\n" | ||
39 | FN_DEF@[28; 56) | ||
40 | FN_KW@[28; 30) "fn" | ||
41 | WHITESPACE@[30; 31) " " | ||
42 | NAME@[31; 32) | ||
43 | IDENT@[31; 32) "b" | ||
44 | PARAM_LIST@[32; 53) | ||
45 | L_PAREN@[32; 33) "(" | ||
46 | PARAM@[33; 52) | ||
47 | PLACEHOLDER_PAT@[33; 34) | ||
48 | UNDERSCORE@[33; 34) "_" | ||
49 | COLON@[34; 35) ":" | ||
50 | WHITESPACE@[35; 36) " " | ||
51 | IMPL_TRAIT_TYPE@[36; 52) | ||
52 | IMPL_KW@[36; 40) "impl" | ||
53 | WHITESPACE@[40; 41) " " | ||
54 | TYPE_BOUND_LIST@[41; 52) | ||
55 | TYPE_BOUND@[41; 52) | ||
56 | PATH_TYPE@[41; 52) | ||
57 | PATH@[41; 52) | ||
58 | PATH_SEGMENT@[41; 52) | ||
59 | NAME_REF@[41; 46) | ||
60 | IDENT@[41; 46) "FnMut" | ||
61 | PARAM_LIST@[46; 52) | ||
62 | L_PAREN@[46; 47) "(" | ||
63 | PARAM@[47; 51) | ||
64 | PATH_TYPE@[47; 51) | ||
65 | PATH@[47; 51) | ||
66 | PATH@[47; 48) | ||
67 | PATH_SEGMENT@[47; 48) | ||
68 | NAME_REF@[47; 48) | ||
69 | IDENT@[47; 48) "x" | ||
70 | COLONCOLON@[48; 50) "::" | ||
71 | PATH_SEGMENT@[50; 51) | ||
72 | NAME_REF@[50; 51) | ||
73 | IDENT@[50; 51) "Y" | ||
74 | R_PAREN@[51; 52) ")" | ||
75 | R_PAREN@[52; 53) ")" | ||
76 | WHITESPACE@[53; 54) " " | ||
77 | BLOCK_EXPR@[54; 56) | ||
78 | BLOCK@[54; 56) | ||
79 | L_CURLY@[54; 55) "{" | ||
80 | R_CURLY@[55; 56) "}" | ||
81 | WHITESPACE@[56; 58) "\n\n" | ||
82 | FN_DEF@[58; 87) | ||
83 | FN_KW@[58; 60) "fn" | ||
84 | WHITESPACE@[60; 61) " " | ||
85 | NAME@[61; 62) | ||
86 | IDENT@[61; 62) "c" | ||
87 | PARAM_LIST@[62; 84) | ||
88 | L_PAREN@[62; 63) "(" | ||
89 | PARAM@[63; 83) | ||
90 | PLACEHOLDER_PAT@[63; 64) | ||
91 | UNDERSCORE@[63; 64) "_" | ||
92 | COLON@[64; 65) ":" | ||
93 | WHITESPACE@[65; 66) " " | ||
94 | IMPL_TRAIT_TYPE@[66; 83) | ||
95 | IMPL_KW@[66; 70) "impl" | ||
96 | WHITESPACE@[70; 71) " " | ||
97 | TYPE_BOUND_LIST@[71; 83) | ||
98 | TYPE_BOUND@[71; 83) | ||
99 | PATH_TYPE@[71; 83) | ||
100 | PATH@[71; 83) | ||
101 | PATH_SEGMENT@[71; 83) | ||
102 | NAME_REF@[71; 76) | ||
103 | IDENT@[71; 76) "FnMut" | ||
104 | PARAM_LIST@[76; 83) | ||
105 | L_PAREN@[76; 77) "(" | ||
106 | PARAM@[77; 82) | ||
107 | REFERENCE_TYPE@[77; 82) | ||
108 | AMP@[77; 78) "&" | ||
109 | PATH_TYPE@[78; 82) | ||
110 | PATH@[78; 82) | ||
111 | PATH@[78; 79) | ||
112 | PATH_SEGMENT@[78; 79) | ||
113 | NAME_REF@[78; 79) | ||
114 | IDENT@[78; 79) "x" | ||
115 | COLONCOLON@[79; 81) "::" | ||
116 | PATH_SEGMENT@[81; 82) | ||
117 | NAME_REF@[81; 82) | ||
118 | IDENT@[81; 82) "Y" | ||
119 | R_PAREN@[82; 83) ")" | ||
120 | R_PAREN@[83; 84) ")" | ||
121 | WHITESPACE@[84; 85) " " | ||
122 | BLOCK_EXPR@[85; 87) | ||
123 | BLOCK@[85; 87) | ||
124 | L_CURLY@[85; 86) "{" | ||
125 | R_CURLY@[86; 87) "}" | ||
126 | WHITESPACE@[87; 88) "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rs b/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rs new file mode 100644 index 000000000..cd204f65e --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rs | |||
@@ -0,0 +1,5 @@ | |||
1 | type X = (); | ||
2 | |||
3 | fn main() { | ||
4 | let ():::X = (); | ||
5 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.txt b/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.txt new file mode 100644 index 000000000..d656e74b1 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.txt | |||
@@ -0,0 +1,50 @@ | |||
1 | SOURCE_FILE@[0; 49) | ||
2 | TYPE_ALIAS_DEF@[0; 12) | ||
3 | TYPE_KW@[0; 4) "type" | ||
4 | WHITESPACE@[4; 5) " " | ||
5 | NAME@[5; 6) | ||
6 | IDENT@[5; 6) "X" | ||
7 | WHITESPACE@[6; 7) " " | ||
8 | EQ@[7; 8) "=" | ||
9 | WHITESPACE@[8; 9) " " | ||
10 | TUPLE_TYPE@[9; 11) | ||
11 | L_PAREN@[9; 10) "(" | ||
12 | R_PAREN@[10; 11) ")" | ||
13 | SEMI@[11; 12) ";" | ||
14 | WHITESPACE@[12; 14) "\n\n" | ||
15 | FN_DEF@[14; 48) | ||
16 | FN_KW@[14; 16) "fn" | ||
17 | WHITESPACE@[16; 17) " " | ||
18 | NAME@[17; 21) | ||
19 | IDENT@[17; 21) "main" | ||
20 | PARAM_LIST@[21; 23) | ||
21 | L_PAREN@[21; 22) "(" | ||
22 | R_PAREN@[22; 23) ")" | ||
23 | WHITESPACE@[23; 24) " " | ||
24 | BLOCK_EXPR@[24; 48) | ||
25 | BLOCK@[24; 48) | ||
26 | L_CURLY@[24; 25) "{" | ||
27 | WHITESPACE@[25; 30) "\n " | ||
28 | LET_STMT@[30; 46) | ||
29 | LET_KW@[30; 33) "let" | ||
30 | WHITESPACE@[33; 34) " " | ||
31 | TUPLE_PAT@[34; 36) | ||
32 | L_PAREN@[34; 35) "(" | ||
33 | R_PAREN@[35; 36) ")" | ||
34 | COLON@[36; 37) ":" | ||
35 | PATH_TYPE@[37; 40) | ||
36 | PATH@[37; 40) | ||
37 | PATH_SEGMENT@[37; 40) | ||
38 | COLONCOLON@[37; 39) "::" | ||
39 | NAME_REF@[39; 40) | ||
40 | IDENT@[39; 40) "X" | ||
41 | WHITESPACE@[40; 41) " " | ||
42 | EQ@[41; 42) "=" | ||
43 | WHITESPACE@[42; 43) " " | ||
44 | TUPLE_EXPR@[43; 45) | ||
45 | L_PAREN@[43; 44) "(" | ||
46 | R_PAREN@[44; 45) ")" | ||
47 | SEMI@[45; 46) ";" | ||
48 | WHITESPACE@[46; 47) "\n" | ||
49 | R_CURLY@[47; 48) "}" | ||
50 | WHITESPACE@[48; 49) "\n" | ||