diff options
author | Erlend Tobiassen <[email protected]> | 2019-01-22 13:46:06 +0000 |
---|---|---|
committer | Erlend Tobiassen <[email protected]> | 2019-01-22 13:46:06 +0000 |
commit | 84f888e93ddfcaa573f65ddf49180a4665f14b50 (patch) | |
tree | 450f10befbcaf8e9625017cd10d8859bb6c7f4d0 | |
parent | 9f3d133813e519ea769c23565843587dea8d55b2 (diff) |
No need for is_type_start
-rw-r--r-- | crates/ra_syntax/src/grammar/type_params.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar/types.rs | 8 |
2 files changed, 1 insertions, 9 deletions
diff --git a/crates/ra_syntax/src/grammar/type_params.rs b/crates/ra_syntax/src/grammar/type_params.rs index 369125b39..1ec813b3e 100644 --- a/crates/ra_syntax/src/grammar/type_params.rs +++ b/crates/ra_syntax/src/grammar/type_params.rs | |||
@@ -126,7 +126,7 @@ fn is_where_predicate(p: &mut Parser) -> bool { | |||
126 | match p.current() { | 126 | match p.current() { |
127 | LIFETIME => true, | 127 | LIFETIME => true, |
128 | IMPL_KW => false, | 128 | IMPL_KW => false, |
129 | _ => types::is_type_start(p), | 129 | token => types::TYPE_FIRST.contains(token), |
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
diff --git a/crates/ra_syntax/src/grammar/types.rs b/crates/ra_syntax/src/grammar/types.rs index c626abcfd..21d89d83b 100644 --- a/crates/ra_syntax/src/grammar/types.rs +++ b/crates/ra_syntax/src/grammar/types.rs | |||
@@ -36,14 +36,6 @@ fn type_with_bounds_cond(p: &mut Parser, allow_bounds: bool) { | |||
36 | } | 36 | } |
37 | } | 37 | } |
38 | 38 | ||
39 | pub(super) fn is_type_start(p: &mut Parser) -> bool { | ||
40 | if TYPE_FIRST.contains(p.current()) { | ||
41 | true | ||
42 | } else { | ||
43 | paths::is_path_start(p) | ||
44 | } | ||
45 | } | ||
46 | |||
47 | pub(super) fn ascription(p: &mut Parser) { | 39 | pub(super) fn ascription(p: &mut Parser) { |
48 | p.expect(COLON); | 40 | p.expect(COLON); |
49 | type_(p) | 41 | type_(p) |