From 9f3d133813e519ea769c23565843587dea8d55b2 Mon Sep 17 00:00:00 2001 From: Erlend Tobiassen Date: Tue, 22 Jan 2019 14:36:57 +0100 Subject: Prefer TYPE_FIRST --- crates/ra_syntax/src/grammar/types.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/grammar/types.rs b/crates/ra_syntax/src/grammar/types.rs index 83a54c190..c626abcfd 100644 --- a/crates/ra_syntax/src/grammar/types.rs +++ b/crates/ra_syntax/src/grammar/types.rs @@ -37,10 +37,10 @@ fn type_with_bounds_cond(p: &mut Parser, allow_bounds: bool) { } pub(super) fn is_type_start(p: &mut Parser) -> bool { - match p.current() { - L_PAREN | EXCL | STAR | L_BRACK | AMP | UNDERSCORE | FN_KW | FOR_KW | IMPL_KW | DYN_KW - | L_ANGLE => true, - _ => paths::is_path_start(p), + if TYPE_FIRST.contains(p.current()) { + true + } else { + paths::is_path_start(p) } } -- cgit v1.2.3