From: John Turner Date: Thu, 17 Nov 2022 02:11:10 +0000 (-0500) Subject: override "TMPDIR" environment variable for all cargo commands X-Git-Url: https://jturnerusa.dev/gitweb/?a=commitdiff_plain;h=ec6c5e35fab1bfe464abcb2a24eb92cab84a699d;p=emacs.d override "TMPDIR" environment variable for all cargo commands Rustdoc does not respect "CARGO_TARGET_DIR" and instead uses "TMPDIR" or /tmp. On systems that mount /tmp with "noexec" this breaks doc tests, since they can't be executed. --- diff --git a/dir-locals/eglot-rust-dir-locals.el b/dir-locals/eglot-rust-dir-locals.el index 9fff9e8..5f7d0c6 100644 --- a/dir-locals/eglot-rust-dir-locals.el +++ b/dir-locals/eglot-rust-dir-locals.el @@ -3,4 +3,5 @@ (:command "clippy"))))) (rust-format-on-save . t) (rust-format-goto-problem . t) - (rust-rustfmt-switches . ("--edition" "2021"))))) + (rust-rustfmt-switches . ("--edition" "2021")))) + (nil . ((rust-cargo-bin . "TMPDIR=~/tmp cargo"))))