diff options
| author | Sibi Prabakaran <sibi@psibi.in> | 2024-02-17 09:08:04 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-17 09:08:04 +0530 |
| commit | 8bbe70b72fde8046e12e6a41ffbee6c9f6b4ddd7 (patch) | |
| tree | 9393ae1074271d93c396848348e68869fb1dbe55 /rust-compile.el | |
| parent | 9c26dc1195ec05309ee15c014631fb9abd6cf5d2 (diff) | |
| parent | 3948faec12f72b0b11fd573e3bcfe323de5b6d80 (diff) | |
| download | rust-mode-8bbe70b72fde8046e12e6a41ffbee6c9f6b4ddd7.tar.gz | |
Merge pull request #510 from luckysori/match-panics
Match panics in `compilation-mode`
Diffstat (limited to 'rust-compile.el')
| -rw-r--r-- | rust-compile.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rust-compile.el b/rust-compile.el index 1bb3103..04ac6b6 100644 --- a/rust-compile.el +++ b/rust-compile.el @@ -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-panics-compilation-regexps + (let ((re (concat "thread '[^']+' panicked at " rustc-compilation-location))) + (cons re '(2 3 4 nil 1))) + "Specifications for matching panics in rustc invocations. +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 @@ -75,6 +81,9 @@ the compilation window until the top of the error is visible." (add-to-list 'compilation-error-regexp-alist 'rustc-colon) (add-to-list 'compilation-error-regexp-alist-alist (cons 'cargo cargo-compilation-regexps)) + (add-to-list 'compilation-error-regexp-alist-alist + (cons 'rustc-panics rustc-panics-compilation-regexps)) + (add-to-list 'compilation-error-regexp-alist 'rustc-panics) (add-to-list 'compilation-error-regexp-alist 'cargo) (add-hook 'next-error-hook #'rustc-scroll-down-after-next-error))) |
