File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,11 @@ function or trait. When nil, where will be aligned with fn or trait."
149
149
:type 'string
150
150
:group 'rust-mode )
151
151
152
+ (defcustom rust-cargo-bin " cargo"
153
+ " Path to cargo executable."
154
+ :type 'string
155
+ :group 'rust-mode )
156
+
152
157
(defcustom rust-always-locate-project-on-open nil
153
158
" Whether to run `cargo locate-project' every time `rust-mode'
154
159
is activated."
@@ -1569,7 +1574,7 @@ visit the new file."
1569
1574
(interactive )
1570
1575
(when (null rust-buffer-project)
1571
1576
(rust-update-buffer-project))
1572
- (let* ((args (list " cargo" " clippy" (concat " --manifest-path=" rust-buffer-project)))
1577
+ (let* ((args (list rust- cargo-bin " clippy" (concat " --manifest-path=" rust-buffer-project)))
1573
1578
; ; set `compile-command' temporarily so `compile' doesn't
1574
1579
; ; clobber the existing value
1575
1580
(compile-command (mapconcat #'shell-quote-argument args " " )))
@@ -1581,7 +1586,7 @@ visit the new file."
1581
1586
(defun rust-buffer-project ()
1582
1587
" Get project root if possible."
1583
1588
(with-temp-buffer
1584
- (let ((ret (call-process " cargo" nil t nil " locate-project" )))
1589
+ (let ((ret (call-process rust- cargo-bin nil t nil " locate-project" )))
1585
1590
(when (/= ret 0 )
1586
1591
(error " `cargo locate-project' returned %s status: %s " ret (buffer-string )))
1587
1592
(goto-char 0 )
You can’t perform that action at this time.
0 commit comments