diff --git a/crates/ra_syntax/src/grammar/type_params.rs b/crates/ra_syntax/src/grammar/type_params.rs index 369125b394..1ec813b3e1 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 c626abcfda..21d89d83bb 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)