Skip to content

Handle thread IDs in panic output#588

Open
roife wants to merge 1 commit into
rust-lang:masterfrom
roife:fix-panic-thread-id-regexp
Open

Handle thread IDs in panic output#588
roife wants to merge 1 commit into
rust-lang:masterfrom
roife:fix-panic-thread-id-regexp

Conversation

@roife
Copy link
Copy Markdown
Member

@roife roife commented May 19, 2026

Rust 1.91 includes the OS thread ID in panic messages, for example:

thread 'aaa::bbb' (19178688) panicked at crates/a/src/b.rs:13:9:

The existing panic regexp only handled the older form without the thread ID:

thread 'aaa::bbb' panicked at crates/a/src/b.rs:13:9:

This updates rustc-panics-compilation-regexps to 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.

Copilot AI review requested due to automatic review settings May 19, 2026 03:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-regexps to 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants