[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 7b5e5e3370 1/2: Add regexp for stack backtrace l
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 7b5e5e3370 1/2: Add regexp for stack backtrace locations |
Date: |
Sat, 21 Jun 2025 13:03:26 -0400 (EDT) |
branch: elpa/rust-mode
commit 7b5e5e3370a02e183a2cbd1244181008d185c2e9
Author: cydparser <cydparser@gmail.com>
Commit: cydparser <cydparser@gmail.com>
Add regexp for stack backtrace locations
---
rust-compile.el | 9 +++++++++
rust-mode-tests.el | 7 +++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/rust-compile.el b/rust-compile.el
index abeb753431..cbdf43adbe 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
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index 56d759cfa6..259afb2888 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -3694,6 +3694,7 @@ let b = 1;"
(insert " ::: file5.rs:12:34\n\n")
(insert "thread 'main' panicked at src/file7.rs:12:34:\n\n")
(insert "[src/file8.rs:159:5] symbol_value(SOME_VAR) = Some(\n\n")
+ (insert " at file9.rs:12:34\n\n")
;; should not match
(insert "werror found a -> b\n --> no_match.rs:12:34\n\n")
(insert "error[E0061]: this function takes 1 parameter but 2 parameters
were supplied\n --> file6.rs:132:34
@@ -3714,13 +3715,15 @@ let b = 1;"
((like-previous-one "82" back-to-indentation compilation-info
"82")
(like-previous-one "132" back-to-indentation compilation-info
"132"))
(("src/file7.rs" "12" "34" nil "src/file7.rs:12:34"))
- (("src/file8.rs" "159" "5" compilation-info
"src/file8.rs:159:5")))
+ (("src/file8.rs" "159" "5" compilation-info
"src/file8.rs:159:5"))
+ (("file9.rs" "12" "34" compilation-info "file9.rs:12:34")))
(mapcar #'rust-collect-matches
(list rustc-compilation-regexps
rustc-colon-compilation-regexps
rustc-refs-compilation-regexps
rustc-panics-compilation-regexps
- rustc-dbg!-compilation-regexps))))))
+ rustc-dbg!-compilation-regexps
+ rustc-backtrace-compilation-regexps))))))
;; If electric-pair-mode is available, load it and run the tests that use it.
If not,
;; no error--the tests will be skipped.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/rust-mode 7b5e5e3370 1/2: Add regexp for stack backtrace locations,
ELPA Syncer <=