Files
bat/tests/syntax-tests/source/Rust
Jason Mak f89960e3a2 Highlight Rust async and await as keywords
bat's Rust syntax highlighting patch (assets/patches/Rust.sublime-syntax.patch)
targets an older snapshot of sublimehq/Packages' Rust.sublime-syntax
(pinned submodule commit 759d6eed) whose keyword.control.rust match
only lists break|else|for|if|loop|match|while|continue. async and
await aren't included, so both render as plain text instead of
keywords.

Add async|await to that same alternation, matching the style already
used for the rest of the keyword list. Verified against the actual
pinned submodule content (fetched directly rather than the current
upstream HEAD, which has since restructured this section entirely)
that the patch context at line 139 matches exactly and applies
cleanly with `patch --strip=0`.

Adds a regression test case (async fn with chained .await calls) and
its expected highlighted output, generated to match bat's existing
Monokai Extended color scheme (keyword.control.rust colored the same
as the other control-flow keywords already in that list).

Closes gh-1534.
2026-10-05 12:38:04 +08:00
..