summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/rust-mode.el b/rust-mode.el
index 273a751..bb4d792 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1058,10 +1058,13 @@ the desired identifiers), but does not match type annotations \"foo::<\"."
(let ((result
;; Replace /* with same number of spaces
(replace-regexp-in-string
- "\\(?:/\\*+\\)"
+ "\\(?:/\\*+\\)[!*]?"
(lambda (s)
;; We want the * to line up with the first * of the comment start
- (concat (make-string (- (length s) 1) ?\x20) "*"))
+ (concat (make-string (- (length s)
+ (if (or (string-suffix-p "!" s)
+ (string-suffix-p "**" s)) 2 1))
+ ?\x20) "*"))
line-start)))
;; Make sure we've got at least one space at the end
(if (not (= (aref result (- (length result) 1)) ?\x20))