Skip to content

Commit 5225a84

Browse files
authored
For and await highlighting rust (#42924)
Closes #42922 Release Notes: - Fixed Correctly highlighting the 'for' keyword in Rust as keyword.control only in for loops. - Fixed Highlighting the 'await' keyword in Rust as keyword.control
1 parent 5c70f83 commit 5225a84

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/languages/src/rust/highlights.scm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
[
8686
"as"
8787
"async"
88-
"await"
8988
"const"
9089
"default"
9190
"dyn"
@@ -102,6 +101,7 @@
102101
"ref"
103102
"static"
104103
"struct"
104+
"for"
105105
"trait"
106106
"type"
107107
"union"
@@ -114,10 +114,10 @@
114114
] @keyword
115115

116116
[
117+
"await"
117118
"break"
118119
"continue"
119120
"else"
120-
"for"
121121
"if"
122122
"in"
123123
"loop"
@@ -127,6 +127,9 @@
127127
"yield"
128128
] @keyword.control
129129

130+
(for_expression
131+
("for" @keyword.control))
132+
130133
[
131134
(string_literal)
132135
(raw_string_literal)

0 commit comments

Comments
 (0)