- ### You prefer the path to be found automatically
I fixed it in master https://github.com/racer-rust/racer/commit/3bcf543f3d0237e5fa545c56b2d51f91207ee500. You can manually compile before the next release version.
## 2. Emacs
I created a PR #143 to fix. Or you can do a quick fix:
```elisp
(setq racer-rust-src-path
(let* ((sysroot (string-trim
(shell-command-to-string "rustc --print sysroot")))
(lib-path (concat sysroot "/lib/rustlib/src/rust/library"))
(src-path (concat sysroot "/lib/rustlib/src/rust/src")))
(or (when (file-exists-p lib-path) lib-path)
(when (file-exists-p src-path) src-path))))
I just fixed some issues related to
rust-src
, maybe it works for you.1. Racer
You've set the environment variable
RUST_SRC_PATH
Now update
src
tolibrary
.~/.spacemacs.env for spacemacs user. (Replace username and rust version)
RUST_SRC_PATH=/Users//.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library