mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
internal: Properly check the edition for edition dependent syntax kinds
This commit is contained in:
parent
2b86639018
commit
f90bdfc13d
23 changed files with 348 additions and 130 deletions
|
@ -20,6 +20,7 @@ use rustc_apfloat::{
|
|||
ieee::{Half as f16, Quad as f128},
|
||||
Float,
|
||||
};
|
||||
use span::Edition;
|
||||
use stdx::format_to;
|
||||
use syntax::{algo, ast, match_ast, AstNode, AstToken, Direction, SyntaxToken, T};
|
||||
|
||||
|
@ -251,7 +252,7 @@ pub(super) fn keyword(
|
|||
config: &HoverConfig,
|
||||
token: &SyntaxToken,
|
||||
) -> Option<HoverResult> {
|
||||
if !token.kind().is_keyword() || !config.documentation || !config.keywords {
|
||||
if !token.kind().is_keyword(Edition::CURRENT) || !config.documentation || !config.keywords {
|
||||
return None;
|
||||
}
|
||||
let parent = token.parent()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue