diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/tags.rs | 6 | ||||
-rw-r--r-- | crates/rust-analyzer/src/conv.rs | 4 | ||||
-rw-r--r-- | crates/rust-analyzer/src/semantic_tokens.rs | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index 7fc94d3cd..d833a816b 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs | |||
@@ -232,7 +232,7 @@ fn highlight_element( | |||
232 | | T![loop] | 232 | | T![loop] |
233 | | T![match] | 233 | | T![match] |
234 | | T![return] | 234 | | T![return] |
235 | | T![while] => h | HighlightModifier::Control, | 235 | | T![while] => h | HighlightModifier::ControlFlow, |
236 | T![unsafe] => h | HighlightModifier::Unsafe, | 236 | T![unsafe] => h | HighlightModifier::Unsafe, |
237 | _ => h, | 237 | _ => h, |
238 | } | 238 | } |
diff --git a/crates/ra_ide/src/syntax_highlighting/tags.rs b/crates/ra_ide/src/syntax_highlighting/tags.rs index 8835a5de2..e8b138e1a 100644 --- a/crates/ra_ide/src/syntax_highlighting/tags.rs +++ b/crates/ra_ide/src/syntax_highlighting/tags.rs | |||
@@ -44,7 +44,7 @@ pub enum HighlightTag { | |||
44 | #[repr(u8)] | 44 | #[repr(u8)] |
45 | pub enum HighlightModifier { | 45 | pub enum HighlightModifier { |
46 | /// Used with keywords like `if` and `break`. | 46 | /// Used with keywords like `if` and `break`. |
47 | Control = 0, | 47 | ControlFlow = 0, |
48 | /// `foo` in `fn foo(x: i32)` is a definition, `foo` in `foo(90 + 2)` is | 48 | /// `foo` in `fn foo(x: i32)` is a definition, `foo` in `foo(90 + 2)` is |
49 | /// not. | 49 | /// not. |
50 | Definition, | 50 | Definition, |
@@ -91,7 +91,7 @@ impl fmt::Display for HighlightTag { | |||
91 | 91 | ||
92 | impl HighlightModifier { | 92 | impl HighlightModifier { |
93 | const ALL: &'static [HighlightModifier] = &[ | 93 | const ALL: &'static [HighlightModifier] = &[ |
94 | HighlightModifier::Control, | 94 | HighlightModifier::ControlFlow, |
95 | HighlightModifier::Definition, | 95 | HighlightModifier::Definition, |
96 | HighlightModifier::Mutable, | 96 | HighlightModifier::Mutable, |
97 | HighlightModifier::Unsafe, | 97 | HighlightModifier::Unsafe, |
@@ -99,7 +99,7 @@ impl HighlightModifier { | |||
99 | 99 | ||
100 | fn as_str(self) -> &'static str { | 100 | fn as_str(self) -> &'static str { |
101 | match self { | 101 | match self { |
102 | HighlightModifier::Control => "control", | 102 | HighlightModifier::ControlFlow => "control", |
103 | HighlightModifier::Definition => "declaration", | 103 | HighlightModifier::Definition => "declaration", |
104 | HighlightModifier::Mutable => "mutable", | 104 | HighlightModifier::Mutable => "mutable", |
105 | HighlightModifier::Unsafe => "unsafe", | 105 | HighlightModifier::Unsafe => "unsafe", |
diff --git a/crates/rust-analyzer/src/conv.rs b/crates/rust-analyzer/src/conv.rs index 57c4c8ce5..b2b1cb625 100644 --- a/crates/rust-analyzer/src/conv.rs +++ b/crates/rust-analyzer/src/conv.rs | |||
@@ -20,7 +20,7 @@ use ra_vfs::LineEndings; | |||
20 | 20 | ||
21 | use crate::{ | 21 | use crate::{ |
22 | req, | 22 | req, |
23 | semantic_tokens::{self, ModifierSet, CONSTANT, CONTROL, MUTABLE, UNSAFE}, | 23 | semantic_tokens::{self, ModifierSet, CONSTANT, CONTROL_FLOW, MUTABLE, UNSAFE}, |
24 | world::WorldSnapshot, | 24 | world::WorldSnapshot, |
25 | Result, | 25 | Result, |
26 | }; | 26 | }; |
@@ -378,7 +378,7 @@ impl Conv for Highlight { | |||
378 | for modifier in self.modifiers.iter() { | 378 | for modifier in self.modifiers.iter() { |
379 | let modifier = match modifier { | 379 | let modifier = match modifier { |
380 | HighlightModifier::Definition => SemanticTokenModifier::DECLARATION, | 380 | HighlightModifier::Definition => SemanticTokenModifier::DECLARATION, |
381 | HighlightModifier::Control => CONTROL, | 381 | HighlightModifier::ControlFlow => CONTROL_FLOW, |
382 | HighlightModifier::Mutable => MUTABLE, | 382 | HighlightModifier::Mutable => MUTABLE, |
383 | HighlightModifier::Unsafe => UNSAFE, | 383 | HighlightModifier::Unsafe => UNSAFE, |
384 | }; | 384 | }; |
diff --git a/crates/rust-analyzer/src/semantic_tokens.rs b/crates/rust-analyzer/src/semantic_tokens.rs index 2a66bbfd8..865fa3b1c 100644 --- a/crates/rust-analyzer/src/semantic_tokens.rs +++ b/crates/rust-analyzer/src/semantic_tokens.rs | |||
@@ -12,7 +12,7 @@ pub(crate) const TYPE_ALIAS: SemanticTokenType = SemanticTokenType::new("typeAli | |||
12 | pub(crate) const UNION: SemanticTokenType = SemanticTokenType::new("union"); | 12 | pub(crate) const UNION: SemanticTokenType = SemanticTokenType::new("union"); |
13 | 13 | ||
14 | pub(crate) const CONSTANT: SemanticTokenModifier = SemanticTokenModifier::new("constant"); | 14 | pub(crate) const CONSTANT: SemanticTokenModifier = SemanticTokenModifier::new("constant"); |
15 | pub(crate) const CONTROL: SemanticTokenModifier = SemanticTokenModifier::new("control"); | 15 | pub(crate) const CONTROL_FLOW: SemanticTokenModifier = SemanticTokenModifier::new("controlFlow"); |
16 | pub(crate) const MUTABLE: SemanticTokenModifier = SemanticTokenModifier::new("mutable"); | 16 | pub(crate) const MUTABLE: SemanticTokenModifier = SemanticTokenModifier::new("mutable"); |
17 | pub(crate) const UNSAFE: SemanticTokenModifier = SemanticTokenModifier::new("unsafe"); | 17 | pub(crate) const UNSAFE: SemanticTokenModifier = SemanticTokenModifier::new("unsafe"); |
18 | 18 | ||
@@ -56,7 +56,7 @@ pub(crate) const SUPPORTED_MODIFIERS: &[SemanticTokenModifier] = &[ | |||
56 | CONSTANT, | 56 | CONSTANT, |
57 | MUTABLE, | 57 | MUTABLE, |
58 | UNSAFE, | 58 | UNSAFE, |
59 | CONTROL, | 59 | CONTROL_FLOW, |
60 | ]; | 60 | ]; |
61 | 61 | ||
62 | #[derive(Default)] | 62 | #[derive(Default)] |