diff options
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))) |
