branch: elpa/rust-mode commit faf6d98b3e2a386f3f37079f9bb6de11a7bce6cc Author: yanchith <yanchi.t...@gmail.com> Commit: yanchith <yanchi.t...@gmail.com>
Make compilation buffer workspace-aware This fixes incorrect paths for workspace projects when running starting compilation from a source file instead of the project root. --- rust-cargo.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-cargo.el b/rust-cargo.el index 0c35ddb150..75f9c16cc7 100644 --- a/rust-cargo.el +++ b/rust-cargo.el @@ -44,7 +44,7 @@ (setq-local process-environment env) ;; Set PATH so we can find cargo. (setq-local exec-path path) - (let ((ret (call-process rust-cargo-bin nil t nil "locate-project"))) + (let ((ret (process-file rust-cargo-bin nil (list (current-buffer) nil) nil "locate-project" "--workspace"))) (when (/= ret 0) (error "`cargo locate-project' returned %s status: %s" ret (buffer-string))) (goto-char 0)