Handle thread IDs in panic output#588
Open
roife wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Updates rust-mode’s compilation/panic matching to support Rust 1.91’s new panic header format that optionally includes an OS thread ID (while remaining compatible with the pre-1.91 format).
Changes:
- Extend
rustc-panics-compilation-regexpsto accept an optional(<digits>)thread-id segment after the thread name. - Update the existing compilation-regexp ERT test to include and assert matching of the new panic header example.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| rust-compile.el | Expands the panic regexp to optionally match the new thread 'name' (id) panicked at ... header while preserving existing capture groups. |
| rust-mode-tests.el | Adds a new panic line with a thread ID and updates expected matches to cover the new format. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rust 1.91 includes the OS thread ID in panic messages, for example:
The existing panic regexp only handled the older form without the thread ID:
This updates
rustc-panics-compilation-regexpsto accept the optional thread ID.Note: This is a backward-compatible regexp change. It keeps matching the pre-1.91 panic format and adds support for the new format with an optional thread ID.
Ref: rust-lang/rust#115746.