[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 3ced187 360/486: remove old-style compilation re
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 3ced187 360/486: remove old-style compilation regex; support `:::` regex |
Date: |
Sat, 7 Aug 2021 09:25:53 -0400 (EDT) |
branch: elpa/rust-mode
commit 3ced18778171f622b06614310693966fcb60a15b
Author: Niko Matsakis <niko@alum.mit.edu>
Commit: Niko Matsakis <niko@alum.mit.edu>
remove old-style compilation regex; support `:::` regex
---
rust-mode.el | 37 ++++++++++++++-----------------------
1 file changed, 14 insertions(+), 23 deletions(-)
diff --git a/rust-mode.el b/rust-mode.el
index 908b892..cbf170e 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1574,31 +1574,22 @@ This is written mainly to be used as
`end-of-defun-function' for Rust."
(defun rust--before-save-hook ()
(when rust-format-on-save (rust-format-buffer)))
-;; Issue #6887: Rather than inheriting the 'gnu compilation error
-;; regexp (which is broken on a few edge cases), add our own 'rust
-;; compilation error regexp and use it instead.
(defvar rustc-compilation-regexps
(let ((file "\\([^\n]+\\)")
(start-line "\\([0-9]+\\)")
- (start-col "\\([0-9]+\\)")
- (end-line "\\([0-9]+\\)")
- (end-col "\\([0-9]+\\)")
- (msg-type
"\\(?:[Ee]rror\\|\\([Ww]arning\\)\\|\\([Nn]ote\\|[Hh]elp\\)\\)"))
- (let ((re (concat "^" file ":" start-line ":" start-col
- ": " end-line ":" end-col
- " " msg-type ":")))
- (cons re '(1 (2 . 4) (3 . 5) (6 . 7)))))
- "Specifications for matching errors in rustc invocations.
-See `compilation-error-regexp-alist' for help on their format.")
-
-(defvar rustc-new-compilation-regexps
- (let ((file "\\([^\n]+\\)")
- (start-line "\\([0-9]+\\)")
(start-col "\\([0-9]+\\)"))
(let ((re (concat "^ *--> " file ":" start-line ":" start-col ; --> 1:2:3
)))
(cons re '(1 2 3))))
- "Specifications for matching errors in rustc invocations (new style).
+ "Specifications for matching errors in rustc invocations.
+See `compilation-error-regexp-alist' for help on their format.")
+
+(defvar rustc-colon-compilation-regexps
+ (let ((file "\\([^\n]+\\)"))
+ (let ((re (concat "^ *::: " file ; ::: foo/bar.rs
+ )))
+ (cons re '(1))))
+ "Specifications for matching `:::` hints in rustc invocations.
See `compilation-error-regexp-alist' for help on their format.")
;; Match test run failures and panics during compilation as
@@ -1631,15 +1622,15 @@ See `compilation-error-regexp-alist' for help on their
format.")
(eval-after-load 'compile
'(progn
(add-to-list 'compilation-error-regexp-alist-alist
- (cons 'rustc-new rustc-new-compilation-regexps))
- (add-to-list 'compilation-error-regexp-alist 'rustc-new)
- (add-hook 'next-error-hook 'rustc-scroll-down-after-next-error)
- (add-to-list 'compilation-error-regexp-alist-alist
(cons 'rustc rustc-compilation-regexps))
(add-to-list 'compilation-error-regexp-alist 'rustc)
(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 'cargo cargo-compilation-regexps))
- (add-to-list 'compilation-error-regexp-alist 'cargo)))
+ (add-to-list 'compilation-error-regexp-alist 'cargo)
+ (add-hook 'next-error-hook 'rustc-scroll-down-after-next-error)))
;;; Functions to submit (parts of) buffers to the rust playpen, for
;;; sharing.
- [nongnu] elpa/rust-mode ac5dac0 335/486: Added test for if-let font lock, (continued)
- [nongnu] elpa/rust-mode ac5dac0 335/486: Added test for if-let font lock, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6550d94 336/486: Renamed and relocated if-let font-lock test, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode a814cd8 338/486: Pass 'visible to get-buffer-window, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c8280ae 339/486: Merge pull request #235 from tromey/get-buffer-window-fixlet, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode fca71c6 342/486: feat(rust-mode): add yield to the keywords list, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode eae291a 343/486: Merge pull request #240 from michael-zapata/feat/add-yield-keyword, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b7cd368 346/486: % as punctuation character., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 04e3078 347/486: Merge pull request #244 from kubo39/percent-as-punctuation-character, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b911835 356/486: Merge pull request #262 from kngwyu/highlight-dyn, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode cc2435b 359/486: Merge pull request #264 from jjwest/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 3ced187 360/486: remove old-style compilation regex; support `:::` regex,
ELPA Syncer <=
- [nongnu] elpa/rust-mode 07e16c6 364/486: Merge pull request #265 from brotzeit/infotype, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode ee262cc 373/486: Merge pull request #266 from brotzeit/format-on-save, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 12cb169 375/486: Merge pull request #284 from riscy/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 8452093 278/486: put remaining defcustoms into the rust-mode group, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 8f1297a 281/486: Merge pull request #187 from tspiteri/format-other-buffers, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5c68caf 282/486: Merge pull request #175 from mrBliss/imenu-unsafe, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f269c5e 292/486: fix syntax of "<" appearing after "?", ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 491ae0e 301/486: Remove unnecessary debugging message, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 60a1f36 310/486: Merge pull request #216 from Aankhen/set-compile-command, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 128601b 317/486: Improve content of `test-project/Cargo.toml'., ELPA Syncer, 2021/08/07