aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/test_data/parser/ok
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/test_data/parser/ok')
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast56
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs8
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast218
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs16
4 files changed, 234 insertions, 64 deletions
diff --git a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast b/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast
deleted file mode 100644
index 5524efaaf..000000000
--- a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rast
+++ /dev/null
@@ -1,56 +0,0 @@
1[email protected]
2 [email protected]
3 [email protected]
4 [email protected] "extern"
5 [email protected] " "
6 [email protected] "fn"
7 [email protected] " "
8 [email protected]
9 [email protected] "foo"
10 [email protected]
11 [email protected] "("
12 [email protected] ")"
13 [email protected] " "
14 [email protected]
15 [email protected] "{"
16 [email protected] "\n"
17 [email protected] "}"
18 [email protected] "\n\n"
19 [email protected]
20 [email protected]
21 [email protected] "extern"
22 [email protected] " "
23 [email protected] "\"C\""
24 [email protected] " "
25 [email protected] "fn"
26 [email protected] " "
27 [email protected]
28 [email protected] "bar"
29 [email protected]
30 [email protected] "("
31 [email protected] ")"
32 [email protected] " "
33 [email protected]
34 [email protected] "{"
35 [email protected] "\n"
36 [email protected] "}"
37 [email protected] "\n\n"
38 [email protected]
39 [email protected]
40 [email protected] "extern"
41 [email protected] " "
42 [email protected] "r\"D\""
43 [email protected] " "
44 [email protected] "fn"
45 [email protected] " "
46 [email protected]
47 [email protected] "baz"
48 [email protected]
49 [email protected] "("
50 [email protected] ")"
51 [email protected] " "
52 [email protected]
53 [email protected] "{"
54 [email protected] "\n"
55 [email protected] "}"
56 [email protected] "\n"
diff --git a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs b/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs
deleted file mode 100644
index e929eef74..000000000
--- a/crates/ra_syntax/test_data/parser/ok/0021_extern_fn.rs
+++ /dev/null
@@ -1,8 +0,0 @@
1extern fn foo() {
2}
3
4extern "C" fn bar() {
5}
6
7extern r"D" fn baz() {
8}
diff --git a/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast b/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast
new file mode 100644
index 000000000..50a6d8ee9
--- /dev/null
+++ b/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rast
@@ -0,0 +1,218 @@
1[email protected]
2 [email protected]
3 [email protected] "async"
4 [email protected] " "
5 [email protected] "fn"
6 [email protected] " "
7 [email protected]
8 [email protected] "foo"
9 [email protected]
10 [email protected] "("
11 [email protected] ")"
12 [email protected] " "
13 [email protected]
14 [email protected] "{"
15 [email protected] "}"
16 [email protected] "\n"
17 [email protected]
18 [email protected]
19 [email protected] "extern"
20 [email protected] " "
21 [email protected] "fn"
22 [email protected] " "
23 [email protected]
24 [email protected] "foo"
25 [email protected]
26 [email protected] "("
27 [email protected] ")"
28 [email protected] " "
29 [email protected]
30 [email protected] "{"
31 [email protected] "}"
32 [email protected] "\n"
33 [email protected]
34 [email protected] "const"
35 [email protected] " "
36 [email protected] "fn"
37 [email protected] " "
38 [email protected]
39 [email protected] "foo"
40 [email protected]
41 [email protected] "("
42 [email protected] ")"
43 [email protected] " "
44 [email protected]
45 [email protected] "{"
46 [email protected] "}"
47 [email protected] "\n"
48 [email protected]
49 [email protected] "const"
50 [email protected] " "
51 [email protected] "unsafe"
52 [email protected] " "
53 [email protected] "fn"
54 [email protected] " "
55 [email protected]
56 [email protected] "foo"
57 [email protected]
58 [email protected] "("
59 [email protected] ")"
60 [email protected] " "
61 [email protected]
62 [email protected] "{"
63 [email protected] "}"
64 [email protected] "\n"
65 [email protected]
66 [email protected] "unsafe"
67 [email protected] " "
68 [email protected]
69 [email protected] "extern"
70 [email protected] " "
71 [email protected] "\"C\""
72 [email protected] " "
73 [email protected] "fn"
74 [email protected] " "
75 [email protected]
76 [email protected] "foo"
77 [email protected]
78 [email protected] "("
79 [email protected] ")"
80 [email protected] " "
81 [email protected]
82 [email protected] "{"
83 [email protected] "}"
84 [email protected] "\n"
85 [email protected]
86 [email protected] "unsafe"
87 [email protected] " "
88 [email protected] "fn"
89 [email protected] " "
90 [email protected]
91 [email protected] "foo"
92 [email protected]
93 [email protected] "("
94 [email protected] ")"
95 [email protected] " "
96 [email protected]
97 [email protected] "{"
98 [email protected] "}"
99 [email protected] "\n"
100 [email protected]
101 [email protected] "async"
102 [email protected] " "
103 [email protected] "unsafe"
104 [email protected] " "
105 [email protected] "fn"
106 [email protected] " "
107 [email protected]
108 [email protected] "foo"
109 [email protected]
110 [email protected] "("
111 [email protected] ")"
112 [email protected] " "
113 [email protected]
114 [email protected] "{"
115 [email protected] "}"
116 [email protected] "\n"
117 [email protected]
118 [email protected] "const"
119 [email protected] " "
120 [email protected] "unsafe"
121 [email protected] " "
122 [email protected] "fn"
123 [email protected] " "
124 [email protected]
125 [email protected] "bar"
126 [email protected]
127 [email protected] "("
128 [email protected] ")"
129 [email protected] " "
130 [email protected]
131 [email protected] "{"
132 [email protected] "}"
133 [email protected] "\n\n"
134 [email protected]
135 [email protected] "unsafe"
136 [email protected] " "
137 [email protected] "trait"
138 [email protected] " "
139 [email protected]
140 [email protected] "T"
141 [email protected] " "
142 [email protected]
143 [email protected] "{"
144 [email protected] "}"
145 [email protected] "\n"
146 [email protected]
147 [email protected] "auto"
148 [email protected] " "
149 [email protected] "trait"
150 [email protected] " "
151 [email protected]
152 [email protected] "T"
153 [email protected] " "
154 [email protected]
155 [email protected] "{"
156 [email protected] "}"
157 [email protected] "\n"
158 [email protected]
159 [email protected] "unsafe"
160 [email protected] " "
161 [email protected] "auto"
162 [email protected] " "
163 [email protected] "trait"
164 [email protected] " "
165 [email protected]
166 [email protected] "T"
167 [email protected] " "
168 [email protected]
169 [email protected] "{"
170 [email protected] "}"
171 [email protected] "\n\n"
172 [email protected]
173 [email protected] "unsafe"
174 [email protected] " "
175 [email protected] "impl"
176 [email protected] " "
177 [email protected]
178 [email protected]
179 [email protected]
180 [email protected]
181 [email protected] "Foo"
182 [email protected] " "
183 [email protected]
184 [email protected] "{"
185 [email protected] "}"
186 [email protected] "\n"
187 [email protected]
188 [email protected] "default"
189 [email protected] " "
190 [email protected] "impl"
191 [email protected] " "
192 [email protected]
193 [email protected]
194 [email protected]
195 [email protected]
196 [email protected] "Foo"
197 [email protected] " "
198 [email protected]
199 [email protected] "{"
200 [email protected] "}"
201 [email protected] "\n"
202 [email protected]
203 [email protected] "unsafe"
204 [email protected] " "
205 [email protected] "default"
206 [email protected] " "
207 [email protected] "impl"
208 [email protected] " "
209 [email protected]
210 [email protected]
211 [email protected]
212 [email protected]
213 [email protected] "Foo"
214 [email protected] " "
215 [email protected]
216 [email protected] "{"
217 [email protected] "}"
218 [email protected] "\n"
diff --git a/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs b/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs
new file mode 100644
index 000000000..8d697c04b
--- /dev/null
+++ b/crates/ra_syntax/test_data/parser/ok/0068_item_modifiers.rs
@@ -0,0 +1,16 @@
1async fn foo() {}
2extern fn foo() {}
3const fn foo() {}
4const unsafe fn foo() {}
5unsafe extern "C" fn foo() {}
6unsafe fn foo() {}
7async unsafe fn foo() {}
8const unsafe fn bar() {}
9
10unsafe trait T {}
11auto trait T {}
12unsafe auto trait T {}
13
14unsafe impl Foo {}
15default impl Foo {}
16unsafe default impl Foo {}