diff options
| author | bors <bors@rust-lang.org> | 2022-05-12 08:16:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-12 08:16:46 +0000 |
| commit | d12130797741edf8d9c6a0233001eb10a11579b3 (patch) | |
| tree | ddeb17b807838301726e294ff5cbdecb213ea5b1 /src/test/debuginfo/enum-thinlto.rs | |
| parent | 94fa8a6534cf93276ad7e205026402f24d41a0b2 (diff) | |
| parent | 23ec7cfec4e59df35cb0e9864ffa889fa9729ca7 (diff) | |
| download | rust-d12130797741edf8d9c6a0233001eb10a11579b3.tar.gz rust-d12130797741edf8d9c6a0233001eb10a11579b3.zip | |
Auto merge of #12220 - arzg:fix-character-semantic-token, r=arzg
Fix `character` semantic token type definition The semantic token type for character literals is called `character`: https://github.com/rust-lang/rust-analyzer/blob/94fa8a6534cf93276ad7e205026402f24d41a0b2/crates/rust-analyzer/src/semantic_tokens.rs#L51 and yet the definition in `package.json` uses `char`. In practice this means trying to highlight `char` doesn’t have any effect, while `character` doesn’t have any hover documentation and doesn’t appear in autocomplete. The definition also defines the fallback semantic token type as `type`; luckily since it currently references the non-existent `char` this doesn’t have any effect, since it doesn’t really make sense to highlight character literals as types. This PR fixes the definition in `package.json` to correctly reference `character`, and also defines the fallback type as `number`. I’d say character literals are closer to a shorthand for writing a number than a string, though this is debatable and I’d be happy to change it to `string`, or anything else.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions
