Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/grammar/paths.rs')
| -rw-r--r-- | crates/parser/src/grammar/paths.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/parser/src/grammar/paths.rs b/crates/parser/src/grammar/paths.rs index 0cc0ed31aa..b4a60574e5 100644 --- a/crates/parser/src/grammar/paths.rs +++ b/crates/parser/src/grammar/paths.rs @@ -1,10 +1,10 @@ use super::*; pub(super) const PATH_FIRST: TokenSet = - TokenSet::new(&[IDENT, T![self], T![super], T![crate], T![:], T![<]]); + TokenSet::new(&[IDENT, T![self], T![super], T![crate], T![Self], T![:], T![<]]); pub(super) fn is_path_start(p: &Parser) -> bool { - is_use_path_start(p) || p.at(T![<]) + is_use_path_start(p) || p.at(T![<]) || p.at(T![Self]) } pub(super) fn is_use_path_start(p: &Parser) -> bool { @@ -88,7 +88,7 @@ fn path_segment(p: &mut Parser, mode: Mode, first: bool) { } // test crate_path // use crate::foo; - T![self] | T![super] | T![crate] => { + T![self] | T![super] | T![crate] | T![Self] => { let m = p.start(); p.bump_any(); m.complete(p, NAME_REF); |