Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compilation regex for panics. #511

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions rust-compile.el
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ See `compilation-error-regexp-alist' for help on their format.")
"Specifications for matching code references in rustc invocations.
See `compilation-error-regexp-alist' for help on their format.")

(defvar rustc-panic-run-regexps
(let ((re (concat "thread '[[:alnum:]]+' panicked at " rustc-compilation-location)))
(cons re '(2 3 4 nil nil)))
"Specifications for matching panics when running and testing.
See `compilation-error-regexp-alist' for help on their format.")

;; Match test run failures and panics during compilation as
;; compilation warnings
(defvar cargo-compilation-regexps
Expand Down Expand Up @@ -73,6 +79,9 @@ the compilation window until the top of the error is visible."
(add-to-list 'compilation-error-regexp-alist-alist
(cons 'rustc-colon rustc-colon-compilation-regexps))
(add-to-list 'compilation-error-regexp-alist 'rustc-colon)
(add-to-list 'compilation-error-regexp-alist-alist
(cons 'rustc-panic rustc-panic-run-regexps))
(add-to-list 'compilation-error-regexp-alist 'rustc-panic)
(add-to-list 'compilation-error-regexp-alist-alist
(cons 'cargo cargo-compilation-regexps))
(add-to-list 'compilation-error-regexp-alist 'cargo)
Expand Down
Loading