Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/hir_def/src/macro_expansion_tests.rs1
-rw-r--r--crates/ide/src/hover/render.rs3
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_def/src/macro_expansion_tests.rs b/crates/hir_def/src/macro_expansion_tests.rs
index 1a7d9aa841..f86d87d5cc 100644
--- a/crates/hir_def/src/macro_expansion_tests.rs
+++ b/crates/hir_def/src/macro_expansion_tests.rs
@@ -302,6 +302,7 @@ fn pretty_print_macro_expansion(expn: SyntaxNode, map: Option<&TokenMap>) -> Str
(T![fn], T!['(']) => "",
(T![']'], _) if curr_kind.is_keyword() => " ",
(T![']'], T![#]) => "\n",
+ (T![Self], T![::]) => "",
_ if prev_kind.is_keyword() => " ",
_ => "",
};
diff --git a/crates/ide/src/hover/render.rs b/crates/ide/src/hover/render.rs
index 40a647c90b..f8ac43bbdd 100644
--- a/crates/ide/src/hover/render.rs
+++ b/crates/ide/src/hover/render.rs
@@ -545,7 +545,6 @@ fn keyword_hints(
},
}
}
-
T![fn] => {
let module = match ast::FnPtrType::cast(parent) {
// treat fn keyword inside function pointer type as primitive
@@ -554,7 +553,7 @@ fn keyword_hints(
};
KeywordHint::new(token.text().to_string(), module)
}
-
+ T![Self] => KeywordHint::new(token.text().to_string(), "self_upper_keyword".into()),
_ => KeywordHint::new(token.text().to_string(), format!("{}_keyword", token.text())),
}
}