This commit is contained in:
Lukas Wirth 2021-06-14 18:01:38 +02:00
parent 178b5ffba3
commit c7c2eb8b08

View file

@ -508,7 +508,7 @@ fn hover_for_keyword(
documentation: bool, documentation: bool,
token: &SyntaxToken, token: &SyntaxToken,
) -> Option<RangeInfo<HoverResult>> { ) -> Option<RangeInfo<HoverResult>> {
if !token.kind().is_keyword() || documentation { if !token.kind().is_keyword() || !documentation {
return None; return None;
} }
let famous_defs = FamousDefs(sema, sema.scope(&token.parent()?).krate()); let famous_defs = FamousDefs(sema, sema.scope(&token.parent()?).krate());