summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-12-07 13:40:01 -0700
committerGitHub <noreply@github.com>2017-12-07 13:40:01 -0700
commit6bcb82b4c2dca4fbbc6585635163bcc5020f6096 (patch)
tree4be8c7195e4d56f239753106e6fd831d2962eada /rust-mode.el
parent04e3078ffc5f4b95e0a62960e36866d4bf1a9537 (diff)
parent6b71c0a3d69821b7647747fd1e0a50c1c8974d07 (diff)
downloadrust-mode-6bcb82b4c2dca4fbbc6585635163bcc5020f6096.tar.gz
Merge pull request #249 from brotzeit/rust--format-call
fix rust--format-call
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 5ce194e..82bcc50 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1353,6 +1353,8 @@ This is written mainly to be used as `end-of-defun-function' for Rust."
(insert-file-contents tmpf)
(error "Rustfmt could not format some lines, see *rustfmt* buffer for details"))
(t
+ (erase-buffer)
+ (insert-file-contents tmpf)
(error "Rustfmt failed, see *rustfmt* buffer for details"))))
(delete-file tmpf))))