[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode e04e485 441/486: rustc-compilation-regexps: hand
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode e04e485 441/486: rustc-compilation-regexps: handle `note` case as compilation-info. |
Date: |
Sat, 7 Aug 2021 09:26:10 -0400 (EDT) |
branch: elpa/rust-mode
commit e04e485b9f74b0fcb52816fb01845af083213bdf
Author: Nathan Moreau <nathan.moreau@m4x.org>
Commit: GitHub <noreply@github.com>
rustc-compilation-regexps: handle `note` case as compilation-info.
---
rust-mode-tests.el | 12 +++++++-----
rust-mode.el | 4 ++--
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index b680548..d0fb27a 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -3040,7 +3040,7 @@ type Foo<T> where T: Copy = Box<T>;
'(7 9))))
-(ert-deftest redo-syntax-after-change-far-from-point ()
+(ert-deftest redo-syntax-after-change-far-from-point ()
(let*
((tmp-file-name (make-temp-file "rust-mdoe-test-issue104"))
(base-contents (apply 'concat (append '("fn foo() {\n\n}\n") (make-list
500 "// More stuff...\n") '("fn bar() {\n\n}\n")))))
@@ -3231,8 +3231,9 @@ impl Two<'a> {
(insert "error found a -> b\n --> file1.rs:12:34\n\n")
(insert "error[E1234]: found a -> b\n --> file2.rs:12:34\n\n")
(insert "warning found a -> b\n --> file3.rs:12:34\n\n")
+ (insert "note: `ZZZ` could also refer to the constant imported here -> b\n
--> file4.rs:12:34\n\n")
;; should not match
- (insert "werror found a -> b\n --> file4.rs:12:34\n\n")
+ (insert "werror found a -> b\n --> no_match.rs:12:34\n\n")
(goto-char (point-min))
(let ((matches nil))
@@ -3241,14 +3242,14 @@ impl Two<'a> {
(mapcar (lambda (r)
(let ((match-pos
(nth (cdr r) rustc-compilation-regexps)))
- (if (eq :is-warning (car r))
+ (if (eq :type (car r))
(compilation-face match-pos)
(match-string match-pos))))
;; see compilation-error-regexp-alist
'((:file . 1)
(:line . 2)
(:column . 3)
- (:is-warning . 4)
+ (:type . 4)
(:mouse-highlight . 5)))
matches))
(setq matches (reverse matches))
@@ -3256,7 +3257,8 @@ impl Two<'a> {
(should (equal
'(("file1.rs" "12" "34" compilation-error "file1.rs:12:34")
("file2.rs" "12" "34" compilation-error "file2.rs:12:34")
- ("file3.rs" "12" "34" compilation-warning "file3.rs:12:34"))
+ ("file3.rs" "12" "34" compilation-warning "file3.rs:12:34")
+ ("file4.rs" "12" "34" compilation-info "file4.rs:12:34"))
matches)))))
;; If electric-pair-mode is available, load it and run the tests that use it.
If not,
diff --git a/rust-mode.el b/rust-mode.el
index e7ef1ef..f91d5ff 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1831,9 +1831,9 @@ Return the created process."
(let ((file "\\([^\n]+\\)")
(start-line "\\([0-9]+\\)")
(start-col "\\([0-9]+\\)"))
- (let ((re (concat "^\\(?:error\\|\\(warning\\)\\)[^\0]+?--> \\("
+ (let ((re (concat "^\\(?:error\\|\\(warning\\)\\|\\(note\\)\\)[^\0]+?-->
\\("
file ":" start-line ":" start-col "\\)")))
- (cons re '(3 4 5 (1) 2))))
+ (cons re '(4 5 6 (1 . 2) 3))))
"Specifications for matching errors in rustc invocations.
See `compilation-error-regexp-alist' for help on their format.")
- [nongnu] elpa/rust-mode f9e3618 468/486: Divide library into sections, (continued)
- [nongnu] elpa/rust-mode f9e3618 468/486: Divide library into sections, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e9e9e32 472/486: Add release build/run functions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e006788 474/486: Add .dir-locals.el, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 7fdb9c2 450/486: Use <kbd> to indicate keyboard input in README (#375), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode d211e68 453/486: Fix various byte compilation warnings in rust-mode-tests.el., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode bded667 457/486: Add missing ‘require’ form., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 139a658 482/486: Create rust-rustfmt.el from existing code, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 494d59f 486/486: Make most additional libraries optional, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 9f3d8cf 432/486: rust format buffer now saves position across multiple frames (#348), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6f1abc3 438/486: Expand README to include more information about features (#358), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e04e485 441/486: rustc-compilation-regexps: handle `note` case as compilation-info.,
ELPA Syncer <=
- [nongnu] elpa/rust-mode 39f32cc 447/486: In emacs >= 26.2, use replace-buffer-contents after formatting, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode eca55c0 451/486: Check for -> and => early in rust-ordinary-lt-gt-p, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode ca7d99c 469/486: Set default directory when compiling., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c5c7ed3 471/486: Update README.md, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 4e394ac 475/486: Add Makefile, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 09b4320 476/486: test: Suppress some noisy messages, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode afeddec 325/486: Merge pull request #224 from tromey/beginning-of-defun, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 7fd78f0 444/486: rust-goto-format-problem: make sure to always just to a buffer that exists., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 9e03890 478/486: Create rust-compile.el from existing code, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 41642f0 481/486: rust-end-of-string: Move definition, ELPA Syncer, 2021/08/07