aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r--crates/ra_parser/src/grammar/expressions/atom.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs
index 5e51d667e..6bda04141 100644
--- a/crates/ra_parser/src/grammar/expressions/atom.rs
+++ b/crates/ra_parser/src/grammar/expressions/atom.rs
@@ -177,21 +177,10 @@ fn array_expr(p: &mut Parser) -> CompletedMarker {
177 // 1, 177 // 1,
178 // 2, 178 // 2,
179 // ]; 179 // ];
180 let first_member_has_attrs = p.at(T![#]);
181 attributes::outer_attributes(p); 180 attributes::outer_attributes(p);
182 181
183 expr(p); 182 expr(p);
184 if p.eat(T![;]) { 183 if p.eat(T![;]) {
185 if first_member_has_attrs {
186 // test_err array_length_attributes
187 // pub const A: &[i64] = &[
188 // #[cfg(test)]
189 // 1;
190 // 2,
191 // ];
192 p.error("removing an expression is not supported in this position");
193 }
194
195 expr(p); 184 expr(p);
196 p.expect(T![']']); 185 p.expect(T![']']);
197 return m.complete(p, ARRAY_EXPR); 186 return m.complete(p, ARRAY_EXPR);