Prefer TYPE_FIRST

This commit is contained in:
Erlend Tobiassen 2019-01-22 14:36:57 +01:00
parent 8198cde13b
commit 9f3d133813

View File

@ -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)
}
}