Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/syntax_highlighting.rs')
-rw-r--r--crates/ide/src/syntax_highlighting.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs
index 776a0f8295..968aa33116 100644
--- a/crates/ide/src/syntax_highlighting.rs
+++ b/crates/ide/src/syntax_highlighting.rs
@@ -118,6 +118,7 @@ pub struct HlRange {
// parameter:: Emitted for non-self function parameters.
// property:: Emitted for struct and union fields.
// selfKeyword:: Emitted for the self function parameter and self path-specifier.
+// selfTypeKeyword:: Emitted for the Self type parameter.
// toolModule:: Emitted for tool modules.
// typeParameter:: Emitted for type parameters.
// unresolvedReference:: Emitted for unresolved references, names that rust-analyzer can't find the definition of.
@@ -327,7 +328,7 @@ fn traverse(
// as otherwise we won't ever visit them
match (token.kind(), parent.kind()) {
(T![ident], NAME | NAME_REF) => parent.into(),
- (T![self] | T![super] | T![crate], NAME_REF) => parent.into(),
+ (T![self] | T![super] | T![crate] | T![Self], NAME_REF) => parent.into(),
(INT_NUMBER, NAME_REF) => parent.into(),
(LIFETIME_IDENT, LIFETIME) => parent.into(),
_ => token.into(),