[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 42c98bb 362/486: Merge pull request #263 from ni
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 42c98bb 362/486: Merge pull request #263 from nikomatsakis/tweak-compilation-regexp |
Date: |
Sat, 7 Aug 2021 09:25:53 -0400 (EDT) |
branch: elpa/rust-mode
commit 42c98bbf3550aff91fd2a3f24637508b408d4cdb
Merge: cc2435b 31b8453
Author: Niko Matsakis <niko@alum.mit.edu>
Commit: GitHub <noreply@github.com>
Merge pull request #263 from nikomatsakis/tweak-compilation-regexp
remove old-style compilation regex; support `:::` regex
---
rust-mode.el | 31 ++++++++++++-------------------
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/rust-mode.el b/rust-mode.el
index 908b892..360943d 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1574,31 +1574,24 @@ 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)))))
+ (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.
See `compilation-error-regexp-alist' for help on their format.")
-(defvar rustc-new-compilation-regexps
+(defvar rustc-colon-compilation-regexps
(let ((file "\\([^\n]+\\)")
(start-line "\\([0-9]+\\)")
(start-col "\\([0-9]+\\)"))
- (let ((re (concat "^ *--> " file ":" start-line ":" start-col ; --> 1:2:3
+ (let ((re (concat "^ *::: " file ":" start-line ":" start-col ; :::
foo/bar.rs
)))
(cons re '(1 2 3))))
- "Specifications for matching errors in rustc invocations (new style).
+ "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 +1624,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 89320ad 323/486: Highlight interpolation in arguments to print! &c., (continued)
- [nongnu] elpa/rust-mode 89320ad 323/486: Highlight interpolation in arguments to print! &c., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e48a650 329/486: Merge pull request #225 from Aankhen/add-var-colours, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6e9db46 331/486: Merge pull request #230 from tromey/fix-indentation-bug, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0e832ec 340/486: Remove `float`, `int`, and `uint` as built-in types., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 302b537 344/486: Revert #216 and Add Suggestions from #226, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b8e4908 345/486: Merge pull request #243 from iwillspeak/rust-compile-command, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6bcb82b 350/486: Merge pull request #249 from brotzeit/rust--format-call, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 705f3e4 352/486: Improved font-locking for print macros, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 2fe1f9d 355/486: add dyn to keywords, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0d408d5 357/486: Merge pull request #253 from jjwest/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 42c98bb 362/486: Merge pull request #263 from nikomatsakis/tweak-compilation-regexp,
ELPA Syncer <=
- [nongnu] elpa/rust-mode 3613551 365/486: throw error in after-save-hook instead of before-save-hook, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 64b4a24 368/486: Merge pull request #272 from tromey/let-ref-font-lock, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 106aeab 369/486: Merge pull request #267 from jthemphill/patch-1, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 256db76 371/486: Merge pull request #281 from ksqsf/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5d0406f 374/486: adjust docstring formatting, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b445737 376/486: imenu: handle lifetimes in impl blocks., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 72f795d 378/486: Add rust-run and rust-test interactive function, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e2e713e 384/486: refer to (point-min) instead of 1, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 497d476 388/486: Reverted back to font-lock-fontify-buffer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode d432409 391/486: Don't insert string delimiter inside strings., ELPA Syncer, 2021/08/07