We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ef0b9c commit 76e95a0Copy full SHA for 76e95a0
src/etc/emacs/rust-mode.el
@@ -62,8 +62,11 @@
62
(back-to-indentation)
63
(let ((level (rust-paren-level)))
64
(cond
65
- ;; A function return type is 1 level indented
66
- ((looking-at "->") (* rust-indent-offset (+ level 1)))
+ ;; A function return type is indented to the corresponding function arguments
+ ((looking-at "->")
67
+ (save-excursion
68
+ (backward-list)
69
+ (rust-first-indent-after-brace)))
70
71
;; A closing brace is 1 level unindended
72
((looking-at "}") (* rust-indent-offset (- level 1)))
0 commit comments