No need for is_type_start

This commit is contained in:
Erlend Tobiassen 2019-01-22 14:46:06 +01:00
parent 9f3d133813
commit 84f888e93d
2 changed files with 1 additions and 9 deletions

View file

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

View file

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