From 42db29a32d7f44edc73966e2a42aaab98d46996f Mon Sep 17 00:00:00 2001 From: Nik Revenco Date: Fri, 11 Jul 2025 03:21:45 +0100 Subject: [PATCH] fix: highlight `_` in `[_]` as `@comment.unused` --- runtime/queries/rust/highlights.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 69bffa843..4134e681a 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -88,9 +88,14 @@ ((type_arguments (type_identifier) @constant) (#match? @constant "^[A-Z_]+$")) (type_arguments (type_identifier) @type) +; `_` in `(_, _)` (tuple_struct_pattern "_" @comment.unused) +; `_` in `Vec<_>` ((type_arguments (type_identifier) @comment.unused) (#eq? @comment.unused "_")) +; `_` in `Rc<[_]>` +((array_type (type_identifier) @comment.unused) + (#eq? @comment.unused "_")) ; --- ; Primitives