Skip to content

Commit 238d7bd

Browse files
authored
Merge pull request rust-lang#19045 from ChayimFriedman2/missing-token
fix: Fix a missing standard token in semantic highlighting
2 parents ad0aea4 + 86d5e29 commit 238d7bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/lsp/semantic_tokens.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ macro_rules! define_semantic_token_types {
2424
}
2525

2626
pub(crate) const SUPPORTED_TYPES: &[SemanticTokenType] = &[
27-
$(SemanticTokenType::$standard,)*
27+
$(self::types::$standard,)*
2828
$(self::types::$custom),*
2929
];
3030

3131
pub(crate) fn standard_fallback_type(token: SemanticTokenType) -> Option<SemanticTokenType> {
3232
use self::types::*;
3333
$(
3434
if token == $custom {
35-
None $(.or(Some(SemanticTokenType::$fallback)))?
35+
None $(.or(Some(self::types::$fallback)))?
3636
} else
3737
)*
3838
{ Some(token )}
@@ -60,6 +60,7 @@ define_semantic_token_types![
6060
STRUCT,
6161
TYPE_PARAMETER,
6262
VARIABLE,
63+
TYPE,
6364
}
6465

6566
custom {

0 commit comments

Comments
 (0)