diff options
author | DJMcNab <[email protected]> | 2019-01-24 21:19:16 +0000 |
---|---|---|
committer | DJMcNab <[email protected]> | 2019-01-24 21:19:16 +0000 |
commit | 4899e7be76c5c8309222c8afe1c0f74dc59a4345 (patch) | |
tree | 986351c9e622ca516057e592cdc202fc724d6453 /crates/ra_syntax/tests/data/parser/ok | |
parent | abb9bfe44dfe1fb0685ead5e000ed281c55c8968 (diff) |
Support universal function call syntax in function calls
Diffstat (limited to 'crates/ra_syntax/tests/data/parser/ok')
-rw-r--r-- | crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.rs | 15 | ||||
-rw-r--r-- | crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.txt | 123 |
2 files changed, 138 insertions, 0 deletions
diff --git a/crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.rs b/crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.rs new file mode 100644 index 000000000..6c02e65ed --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.rs | |||
@@ -0,0 +1,15 @@ | |||
1 | // https://github.com/rust-analyzer/rust-analyzer/issues/596 | ||
2 | |||
3 | struct Foo; | ||
4 | |||
5 | impl Foo { | ||
6 | fn bar() -> bool { | ||
7 | unimplemented!() | ||
8 | } | ||
9 | } | ||
10 | |||
11 | fn baz(_: bool) {} | ||
12 | |||
13 | fn main() { | ||
14 | baz(<Foo>::bar()) | ||
15 | } | ||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.txt b/crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.txt new file mode 100644 index 000000000..d1d890e50 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/ok/0042_ufcs_call_list.txt | |||
@@ -0,0 +1,123 @@ | |||
1 | SOURCE_FILE@[0; 199) | ||
2 | COMMENT@[0; 60) | ||
3 | WHITESPACE@[60; 62) | ||
4 | STRUCT_DEF@[62; 73) | ||
5 | STRUCT_KW@[62; 68) | ||
6 | WHITESPACE@[68; 69) | ||
7 | NAME@[69; 72) | ||
8 | IDENT@[69; 72) "Foo" | ||
9 | SEMI@[72; 73) | ||
10 | WHITESPACE@[73; 75) | ||
11 | IMPL_BLOCK@[75; 141) | ||
12 | IMPL_KW@[75; 79) | ||
13 | WHITESPACE@[79; 80) | ||
14 | PATH_TYPE@[80; 83) | ||
15 | PATH@[80; 83) | ||
16 | PATH_SEGMENT@[80; 83) | ||
17 | NAME_REF@[80; 83) | ||
18 | IDENT@[80; 83) "Foo" | ||
19 | WHITESPACE@[83; 84) | ||
20 | ITEM_LIST@[84; 141) | ||
21 | L_CURLY@[84; 85) | ||
22 | WHITESPACE@[85; 90) | ||
23 | FN_DEF@[90; 139) | ||
24 | FN_KW@[90; 92) | ||
25 | WHITESPACE@[92; 93) | ||
26 | NAME@[93; 96) | ||
27 | IDENT@[93; 96) "bar" | ||
28 | PARAM_LIST@[96; 98) | ||
29 | L_PAREN@[96; 97) | ||
30 | R_PAREN@[97; 98) | ||
31 | WHITESPACE@[98; 99) | ||
32 | RET_TYPE@[99; 106) | ||
33 | THIN_ARROW@[99; 101) | ||
34 | WHITESPACE@[101; 102) | ||
35 | PATH_TYPE@[102; 106) | ||
36 | PATH@[102; 106) | ||
37 | PATH_SEGMENT@[102; 106) | ||
38 | NAME_REF@[102; 106) | ||
39 | IDENT@[102; 106) "bool" | ||
40 | WHITESPACE@[106; 107) | ||
41 | BLOCK@[107; 139) | ||
42 | L_CURLY@[107; 108) | ||
43 | WHITESPACE@[108; 117) | ||
44 | MACRO_CALL@[117; 133) | ||
45 | PATH@[117; 130) | ||
46 | PATH_SEGMENT@[117; 130) | ||
47 | NAME_REF@[117; 130) | ||
48 | IDENT@[117; 130) "unimplemented" | ||
49 | EXCL@[130; 131) | ||
50 | TOKEN_TREE@[131; 133) | ||
51 | L_PAREN@[131; 132) | ||
52 | R_PAREN@[132; 133) | ||
53 | WHITESPACE@[133; 138) | ||
54 | R_CURLY@[138; 139) | ||
55 | WHITESPACE@[139; 140) | ||
56 | R_CURLY@[140; 141) | ||
57 | WHITESPACE@[141; 143) | ||
58 | FN_DEF@[143; 161) | ||
59 | FN_KW@[143; 145) | ||
60 | WHITESPACE@[145; 146) | ||
61 | NAME@[146; 149) | ||
62 | IDENT@[146; 149) "baz" | ||
63 | PARAM_LIST@[149; 158) | ||
64 | L_PAREN@[149; 150) | ||
65 | PARAM@[150; 157) | ||
66 | PLACEHOLDER_PAT@[150; 151) | ||
67 | UNDERSCORE@[150; 151) | ||
68 | COLON@[151; 152) | ||
69 | WHITESPACE@[152; 153) | ||
70 | PATH_TYPE@[153; 157) | ||
71 | PATH@[153; 157) | ||
72 | PATH_SEGMENT@[153; 157) | ||
73 | NAME_REF@[153; 157) | ||
74 | IDENT@[153; 157) "bool" | ||
75 | R_PAREN@[157; 158) | ||
76 | WHITESPACE@[158; 159) | ||
77 | BLOCK@[159; 161) | ||
78 | L_CURLY@[159; 160) | ||
79 | R_CURLY@[160; 161) | ||
80 | WHITESPACE@[161; 163) | ||
81 | FN_DEF@[163; 198) | ||
82 | FN_KW@[163; 165) | ||
83 | WHITESPACE@[165; 166) | ||
84 | NAME@[166; 170) | ||
85 | IDENT@[166; 170) "main" | ||
86 | PARAM_LIST@[170; 172) | ||
87 | L_PAREN@[170; 171) | ||
88 | R_PAREN@[171; 172) | ||
89 | WHITESPACE@[172; 173) | ||
90 | BLOCK@[173; 198) | ||
91 | L_CURLY@[173; 174) | ||
92 | WHITESPACE@[174; 179) | ||
93 | CALL_EXPR@[179; 196) | ||
94 | PATH_EXPR@[179; 182) | ||
95 | PATH@[179; 182) | ||
96 | PATH_SEGMENT@[179; 182) | ||
97 | NAME_REF@[179; 182) | ||
98 | IDENT@[179; 182) "baz" | ||
99 | ARG_LIST@[182; 196) | ||
100 | L_PAREN@[182; 183) | ||
101 | CALL_EXPR@[183; 195) | ||
102 | PATH_EXPR@[183; 193) | ||
103 | PATH@[183; 193) | ||
104 | PATH@[183; 188) | ||
105 | PATH_SEGMENT@[183; 188) | ||
106 | L_ANGLE@[183; 184) | ||
107 | PATH_TYPE@[184; 187) | ||
108 | PATH@[184; 187) | ||
109 | PATH_SEGMENT@[184; 187) | ||
110 | NAME_REF@[184; 187) | ||
111 | IDENT@[184; 187) "Foo" | ||
112 | R_ANGLE@[187; 188) | ||
113 | COLONCOLON@[188; 190) | ||
114 | PATH_SEGMENT@[190; 193) | ||
115 | NAME_REF@[190; 193) | ||
116 | IDENT@[190; 193) "bar" | ||
117 | ARG_LIST@[193; 195) | ||
118 | L_PAREN@[193; 194) | ||
119 | R_PAREN@[194; 195) | ||
120 | R_PAREN@[195; 196) | ||
121 | WHITESPACE@[196; 197) | ||
122 | R_CURLY@[197; 198) | ||
123 | WHITESPACE@[198; 199) | ||