diff options
Diffstat (limited to 'crates/ra_syntax/src/grammar/type_params.rs')
-rw-r--r-- | crates/ra_syntax/src/grammar/type_params.rs | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/crates/ra_syntax/src/grammar/type_params.rs b/crates/ra_syntax/src/grammar/type_params.rs index 735c728e5..68eca0ce8 100644 --- a/crates/ra_syntax/src/grammar/type_params.rs +++ b/crates/ra_syntax/src/grammar/type_params.rs | |||
@@ -126,26 +126,15 @@ fn where_predicate(p: &mut Parser) { | |||
126 | p.error("expected colon"); | 126 | p.error("expected colon"); |
127 | } | 127 | } |
128 | } | 128 | } |
129 | // test where_pred_for | ||
130 | // fn test<F>() | ||
131 | // where | ||
132 | // for<'a> F: Fn(&'a str) | ||
133 | // { } | ||
134 | FOR_KW => { | ||
135 | p.bump(); | ||
136 | if p.at(L_ANGLE) { | ||
137 | type_param_list(p); | ||
138 | types::path_type(p); | ||
139 | if p.at(COLON) { | ||
140 | bounds(p); | ||
141 | } else { | ||
142 | p.error("expected colon"); | ||
143 | } | ||
144 | } else { | ||
145 | p.error("expected `<`"); | ||
146 | } | ||
147 | } | ||
148 | _ => { | 129 | _ => { |
130 | // test where_pred_for | ||
131 | // fn test<F>() | ||
132 | // where | ||
133 | // for<'a> F: Fn(&'a str) | ||
134 | // { } | ||
135 | if p.at(FOR_KW) { | ||
136 | types::for_binder(p); | ||
137 | } | ||
149 | types::path_type(p); | 138 | types::path_type(p); |
150 | if p.at(COLON) { | 139 | if p.at(COLON) { |
151 | bounds(p); | 140 | bounds(p); |