Skip to content

Commit 358f361

Browse files
committed
---
yaml --- r: 78789 b: refs/heads/try c: fe7092d h: refs/heads/master i: 78787: 9619bcc v: v3
1 parent 09dbd88 commit 358f361

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 25ed29a0edb3d48fef843a0b818ee68faf2252da
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
5-
refs/heads/try: 521fb049be4642919d690a01ef8617a9508d3909
5+
refs/heads/try: fe7092dafb83e7d541aa06095342252dc02c2d5d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/etc/emacs/rust-mode.el

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,23 @@ The initializer is `DEFAULT-TAB-WIDTH'.")
229229
;; regexp (which is broken on a few edge cases), add our own 'rust
230230
;; compilation error regexp and use it instead.
231231
(defvar rustc-compilation-regexps
232-
(let ((re (concat "^\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\): "
233-
"\\([0-9]+\\):\\([0-9]+\\) "
234-
"\\(?:[Ee]rror\\|\\([Ww]arning\\)\\):")))
235-
(cons re '(1 (2 . 4) (3 . 5) (6))))
232+
(let ((file "\\([^ \n]+\\)")
233+
(start-line "\\([0-9]+\\)")
234+
(start-col "\\([0-9]+\\)")
235+
(end-line "\\([0-9]+\\)")
236+
(end-col "\\([0-9]+\\)")
237+
(error-or-warning "\\(?:[Ee]rror\\|\\([Ww]arning\\)\\)"))
238+
(let ((re (concat "^" file ":" start-line ":" start-col
239+
": " end-line ":" end-col
240+
" \\(?:[Ee]rror\\|\\([Ww]arning\\)\\):")))
241+
(cons re '(1 (2 . 4) (3 . 5) (6)))))
236242
"Specifications for matching errors in rustc invocations.
237243
See `compilation-error-regexp-alist for help on their format.")
238244

239-
(add-to-list 'compilation-error-regexp-alist-alist
240-
(cons 'rustc rustc-compilation-regexps))
241-
(add-to-list 'compilation-error-regexp-alist 'rustc)
245+
(eval-after-load 'compile
246+
'(progn
247+
(add-to-list 'compilation-error-regexp-alist-alist
248+
(cons 'rustc rustc-compilation-regexps))
249+
(add-to-list 'compilation-error-regexp-alist 'rustc)))
242250

243251
;;; rust-mode.el ends here

0 commit comments

Comments
 (0)