mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
No need for is_type_start
This commit is contained in:
parent
9f3d133813
commit
84f888e93d
2 changed files with 1 additions and 9 deletions
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue