diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_parser/src/grammar/types.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_parser/src/grammar/types.rs b/crates/ra_parser/src/grammar/types.rs index d4ca94fca..9b2e440fb 100644 --- a/crates/ra_parser/src/grammar/types.rs +++ b/crates/ra_parser/src/grammar/types.rs | |||
@@ -28,7 +28,7 @@ fn type_with_bounds_cond(p: &mut Parser, allow_bounds: bool) { | |||
28 | T![fn] | T![unsafe] | T![extern] => fn_pointer_type(p), | 28 | T![fn] | T![unsafe] | T![extern] => fn_pointer_type(p), |
29 | T![for] => for_type(p), | 29 | T![for] => for_type(p), |
30 | T![impl] => impl_trait_type(p), | 30 | T![impl] => impl_trait_type(p), |
31 | T![dyn ] => dyn_trait_type(p), | 31 | T![dyn] => dyn_trait_type(p), |
32 | // Some path types are not allowed to have bounds (no plus) | 32 | // Some path types are not allowed to have bounds (no plus) |
33 | T![<] => path_type_(p, allow_bounds), | 33 | T![<] => path_type_(p, allow_bounds), |
34 | _ if paths::is_use_path_start(p) => path_or_macro_type_(p, allow_bounds), | 34 | _ if paths::is_use_path_start(p) => path_or_macro_type_(p, allow_bounds), |
@@ -234,9 +234,9 @@ fn impl_trait_type(p: &mut Parser) { | |||
234 | // test dyn_trait_type | 234 | // test dyn_trait_type |
235 | // type A = dyn Iterator<Item=Foo<'a>> + 'a; | 235 | // type A = dyn Iterator<Item=Foo<'a>> + 'a; |
236 | fn dyn_trait_type(p: &mut Parser) { | 236 | fn dyn_trait_type(p: &mut Parser) { |
237 | assert!(p.at(T![dyn ])); | 237 | assert!(p.at(T![dyn])); |
238 | let m = p.start(); | 238 | let m = p.start(); |
239 | p.bump(T![dyn ]); | 239 | p.bump(T![dyn]); |
240 | type_params::bounds_without_colon(p); | 240 | type_params::bounds_without_colon(p); |
241 | m.complete(p, DYN_TRAIT_TYPE); | 241 | m.complete(p, DYN_TRAIT_TYPE); |
242 | } | 242 | } |