File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -225,4 +225,19 @@ The initializer is `DEFAULT-TAB-WIDTH'.")
225
225
226
226
(provide 'rust-mode )
227
227
228
+ ; ; Issue #6887: Rather than inheriting the 'gnu compilation error
229
+ ; ; regexp (which is broken on a few edge cases), add our own 'rust
230
+ ; ; compilation error regexp and use it instead.
231
+ (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 ))))
236
+ " Specifications for matching errors in rustc invocations.
237
+ See `compilation-error-regexp-alist for help on their format." )
238
+
239
+ (add-to-list 'compilation-error-regexp-alist-alist
240
+ (cons 'rustc rustc-compilation-regexps))
241
+ (add-to-list 'compilation-error-regexp-alist 'rustc )
242
+
228
243
; ;; rust-mode.el ends here
You can’t perform that action at this time.
0 commit comments