From 5225a84affc55167645a2f31677bc5c9915e2844 Mon Sep 17 00:00:00 2001 From: aleanon <104034507+aleanon@users.noreply.github.com> Date: Tue, 18 Nov 2025 09:11:36 +0100 Subject: [PATCH] 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 --- crates/languages/src/rust/highlights.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/languages/src/rust/highlights.scm b/crates/languages/src/rust/highlights.scm index ea3935257648b31f666ea64c7c302644ab3eb24e..1a08126b55d2084e39611a9e73cde83b6cfc9999 100644 --- a/crates/languages/src/rust/highlights.scm +++ b/crates/languages/src/rust/highlights.scm @@ -85,7 +85,6 @@ [ "as" "async" - "await" "const" "default" "dyn" @@ -102,6 +101,7 @@ "ref" "static" "struct" + "for" "trait" "type" "union" @@ -114,10 +114,10 @@ ] @keyword [ + "await" "break" "continue" "else" - "for" "if" "in" "loop" @@ -127,6 +127,9 @@ "yield" ] @keyword.control +(for_expression + ("for" @keyword.control)) + [ (string_literal) (raw_string_literal)