aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar/items/traits.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/grammar/items/traits.rs')
-rw-r--r--crates/ra_syntax/src/grammar/items/traits.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_syntax/src/grammar/items/traits.rs b/crates/ra_syntax/src/grammar/items/traits.rs
index 62ab877fc..5dfdb470c 100644
--- a/crates/ra_syntax/src/grammar/items/traits.rs
+++ b/crates/ra_syntax/src/grammar/items/traits.rs
@@ -57,7 +57,7 @@ pub(super) fn impl_item(p: &mut Parser) {
57 p.eat(EXCL); 57 p.eat(EXCL);
58 impl_type(p); 58 impl_type(p);
59 if p.eat(FOR_KW) { 59 if p.eat(FOR_KW) {
60 types::type_(p); 60 impl_type(p);
61 } 61 }
62 type_params::opt_where_clause(p); 62 type_params::opt_where_clause(p);
63 if p.at(L_CURLY) { 63 if p.at(L_CURLY) {
@@ -116,10 +116,11 @@ fn choose_type_params_over_qpath(p: &Parser) -> bool {
116 && (p.nth(2) == R_ANGLE || p.nth(2) == COMMA || p.nth(2) == COLON || p.nth(2) == EQ) 116 && (p.nth(2) == R_ANGLE || p.nth(2) == COMMA || p.nth(2) == COLON || p.nth(2) == EQ)
117} 117}
118 118
119// test impl_type
119// impl Type {} 120// impl Type {}
120// ^^^^ 121// impl Trait1 for T {}
121// impl Trait for T {} 122// impl impl NotType {}
122// ^^^^^ 123// impl Trait2 for impl NotType {}
123pub(crate) fn impl_type(p: &mut Parser) { 124pub(crate) fn impl_type(p: &mut Parser) {
124 if p.at(IMPL_KW) { 125 if p.at(IMPL_KW) {
125 p.error("expected trait or type"); 126 p.error("expected trait or type");
@@ -128,4 +129,3 @@ pub(crate) fn impl_type(p: &mut Parser) {
128 types::type_(p); 129 types::type_(p);
129} 130}
130 131
131