From 7b5e5e3370a02e183a2cbd1244181008d185c2e9 Mon Sep 17 00:00:00 2001 From: cydparser Date: Fri, 20 Jun 2025 18:45:58 -0700 Subject: Add regexp for stack backtrace locations --- rust-compile.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rust-compile.el') diff --git a/rust-compile.el b/rust-compile.el index abeb753..cbdf43a 100644 --- a/rust-compile.el +++ b/rust-compile.el @@ -28,6 +28,12 @@ See `compilation-error-regexp-alist' for help on their format.") "Specifications for matching `:::` hints in rustc invocations. See `compilation-error-regexp-alist' for help on their format.") +(defvar rustc-backtrace-compilation-regexps + (let ((re (concat "^ +at " rustc-compilation-location))) + (cons re '(2 3 4 0 1))) + "Specifications for matching stack backtraces in rustc invocations. +See `compilation-error-regexp-alist' for help on their format.") + (defvar rustc-refs-compilation-regexps (let ((re "^\\([0-9]+\\)[[:space:]]*|")) (cons re '(nil 1 nil 0 1))) @@ -85,6 +91,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-backtrace rustc-backtrace-compilation-regexps)) + (add-to-list 'compilation-error-regexp-alist 'rustc-backtrace) (add-to-list 'compilation-error-regexp-alist-alist (cons 'cargo cargo-compilation-regexps)) (add-to-list 'compilation-error-regexp-alist-alist -- cgit v1.2.3