mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Parse contextual dyn keyword properly in edition 2015
This commit is contained in:
parent
9fd6c695da
commit
f4199f786e
10 changed files with 164 additions and 11 deletions
|
@ -2,6 +2,8 @@ use super::*;
|
|||
|
||||
pub(super) const PATH_FIRST: TokenSet =
|
||||
TokenSet::new(&[IDENT, T![self], T![super], T![crate], T![Self], T![:], T![<]]);
|
||||
pub(super) const WEAK_DYN_PATH_FIRST: TokenSet =
|
||||
TokenSet::new(&[IDENT, T![self], T![super], T![crate], T![Self]]);
|
||||
|
||||
pub(super) fn is_path_start(p: &Parser<'_>) -> bool {
|
||||
is_use_path_start(p) || p.at(T![<]) || p.at(T![Self])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue