mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 14:03:35 +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() {
|
match p.current() {
|
||||||
LIFETIME => true,
|
LIFETIME => true,
|
||||||
IMPL_KW => false,
|
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) {
|
pub(super) fn ascription(p: &mut Parser) {
|
||||||
p.expect(COLON);
|
p.expect(COLON);
|
||||||
type_(p)
|
type_(p)
|
||||||
|
|
Loading…
Reference in a new issue