diff options
author | csmoe <[email protected]> | 2018-09-26 03:01:42 +0100 |
---|---|---|
committer | csmoe <[email protected]> | 2018-09-26 09:53:16 +0100 |
commit | 8b710e95353d9f840f78645c9593a66adb0636b6 (patch) | |
tree | 6a918130bce71b0a4fc331501086d2f65c46a957 /crates/ra_syntax/src | |
parent | edf1cc3582a842837d64fa6ec08df00c028521f9 (diff) |
generate testsuite for impl_type
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r-- | crates/ra_syntax/src/grammar/items/traits.rs | 10 |
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 {} |
123 | pub(crate) fn impl_type(p: &mut Parser) { | 124 | pub(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 | |||