aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/grammar')
-rw-r--r--crates/ra_syntax/src/grammar/items/traits.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/grammar/items/traits.rs b/crates/ra_syntax/src/grammar/items/traits.rs
index c21cfb1a9..25b6cb66b 100644
--- a/crates/ra_syntax/src/grammar/items/traits.rs
+++ b/crates/ra_syntax/src/grammar/items/traits.rs
@@ -54,8 +54,16 @@ pub(super) fn impl_item(p: &mut Parser) {
54 54
55 // test impl_item_neg 55 // test impl_item_neg
56 // impl !Send for X {} 56 // impl !Send for X {}
57 p.eat(EXCL); 57 if p.at(IMPL_KW) {
58 types::type_(p); 58 p.error("expected type");
59 } else {
60 p.eat(EXCL);
61 if p.at(IMPL_KW) {
62 p.error("expected type");
63 } else {
64 types::type_(p);
65 }
66 }
59 if p.eat(FOR_KW) { 67 if p.eat(FOR_KW) {
60 types::type_(p); 68 types::type_(p);
61 } 69 }