# rust: Explicitly capture lifetime identifier \(\#42372\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/2b369d7532ccd5129e6555c57dad3675000475fa)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 2b369d7532ccd5129e6555c57dad3675000475fa

Requested commit: 2b369d7532ccd5129e6555c57dad3675000475fa

Commit: 2b369d7532ccd5129e6555c57dad3675000475fa

Tree: 35f9cc3bf5ae3bc5a36b8e570ab84a365e624fde

Author: Finn Evers

Committer: GitHub

## Message

```
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.
```

## Parents

- [ed61a79cc5a28f36f65f77b16ae6369822845d73](https://git.cafe/gitcafe/zed/commit/ed61a79cc5a28f36f65f77b16ae6369822845d73?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/2b369d7532ccd5129e6555c57dad3675000475fa?format=markdown)
