mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-12-09 10:55:42 +00:00
fix: Recognize Self as a proper keyword
This commit is contained in:
parent
8f504dc873
commit
c0d6471143
27 changed files with 98 additions and 49 deletions
|
|
@ -18,7 +18,7 @@ pub(crate) fn goto_declaration(
|
|||
let file = sema.parse(position.file_id).syntax().clone();
|
||||
let original_token = file
|
||||
.token_at_offset(position.offset)
|
||||
.find(|it| matches!(it.kind(), IDENT | T![self] | T![super] | T![crate]))?;
|
||||
.find(|it| matches!(it.kind(), IDENT | T![self] | T![super] | T![crate] | T![Self]))?;
|
||||
let range = original_token.text_range();
|
||||
let info: Vec<NavigationTarget> = sema
|
||||
.descend_into_macros(original_token)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue