summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
authorNathan Moreau <nathan.moreau@m4x.org>2020-04-12 17:38:48 +0200
committerNathan Moreau <nathan.moreau@m4x.org>2020-04-14 22:52:08 +0200
commit888f3de9922ff648dfb0a464ff8587e76bd0369a (patch)
tree4fb48f88eb124ba8d01fbba3af75416548e07fbf /rust-mode.el
parente04e485b9f74b0fcb52816fb01845af083213bdf (diff)
downloadrust-mode-888f3de9922ff648dfb0a464ff8587e76bd0369a.tar.gz
rust--format-fix-rustfmt-buffer: replace "stdin:" as well as "<stdin>:".
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/rust-mode.el b/rust-mode.el
index f91d5ff..154978b 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1484,6 +1484,8 @@ This is written mainly to be used as `end-of-defun-function' for Rust."
(with-current-buffer (get-buffer rust-rustfmt-buffername)
(goto-char (point-min))
(while (re-search-forward "--> <stdin>:" nil t)
+ (replace-match (format "--> %s:" buffer-name)))
+ (while (re-search-forward "--> stdin:" nil t)
(replace-match (format "--> %s:" buffer-name)))))
;; If rust-mode has been configured to navigate to source of the error