From 84f888e93ddfcaa573f65ddf49180a4665f14b50 Mon Sep 17 00:00:00 2001 From: Erlend Tobiassen Date: Tue, 22 Jan 2019 14:46:06 +0100 Subject: No need for is_type_start --- crates/ra_syntax/src/grammar/type_params.rs | 2 +- crates/ra_syntax/src/grammar/types.rs | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'crates') 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 { match p.current() { LIFETIME => true, IMPL_KW => false, - _ => types::is_type_start(p), + token => types::TYPE_FIRST.contains(token), } } 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) { } } -pub(super) fn is_type_start(p: &mut Parser) -> bool { - if TYPE_FIRST.contains(p.current()) { - true - } else { - paths::is_path_start(p) - } -} - pub(super) fn ascription(p: &mut Parser) { p.expect(COLON); type_(p) -- cgit v1.2.3