rust: Explicitly capture lifetime identifier (#42372)

Closes #42030

This matches what VSCode and basically also this capture does. However,
the identifier capture was overridden by other captures, hence the need
to be explicit here.

| Before | After | 
| - | - |
| <img width="930" height="346" alt="Bildschirmfoto 2025-11-10 um 17 56
28"
src="https://github.com/user-attachments/assets/e938c863-0981-4368-ab0a-a01dd04cfb24"
/> | <img width="930" height="346" alt="Bildschirmfoto 2025-11-10 um 17
54 35"
src="https://github.com/user-attachments/assets/f3b74011-c75c-448a-819e-80e7e8684e92"
/> |


Release Notes:

- Improved lifetime highlighting in Rust using the `lifetime` capture.
This commit is contained in:
Finn Evers
2025-11-10 19:41:14 +01:00
committed by GitHub
parent ed61a79cc5
commit 2b369d7532
+3 -1
View File
@@ -195,7 +195,9 @@
(unary_expression "!" @operator)
operator: "/" @operator
(lifetime) @lifetime
(lifetime
"'" @lifetime
(identifier) @lifetime)
(parameter (identifier) @variable.parameter)