]> jturnerusa.dev Git - emacs.d/commitdiff
override "TMPDIR" environment variable for all cargo commands
authorJohn Turner <jturner.usa@gmail.com>
Thu, 17 Nov 2022 02:11:10 +0000 (21:11 -0500)
committerJohn Turner <jturner.usa@gmail.com>
Thu, 17 Nov 2022 02:11:10 +0000 (21:11 -0500)
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.

dir-locals/eglot-rust-dir-locals.el

index 9fff9e8d0f718e0df8a167d0d403973ab9f0c183..5f7d0c675e4b5c59f566f9d6d7bde0cb8279412f 100644 (file)
@@ -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"))))