racer-rust / emacs-racer

Racer support for Emacs
399 stars 48 forks source link

New install of racer failing, suspected RUST_SRC_PATH problem #139

Closed thor314 closed 3 years ago

thor314 commented 3 years ago

New install of racer, failing to work as intended. Is this an export RUST_SRC_PATH=blah in .zshrc type fix?

racer-debug returns:

$ cd /home/thor/r/imp/
$ export CARGO_HOME=/home/thor/.cargo
$ export RUST_SRC_PATH=/home/thor/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src
$ /home/thor/.cargo/bin/racer complete 3 0 /home/thor/r/imp/src/main.rs /tmp/racerpJLTIq

This command terminated with exit code 1.

stdout:

Unable to find libstd under RUST_SRC_PATH. N.B. RUST_SRC_PATH variable needs to point to the *src* directory inside a rust checkout e.g. "/home/foouser/src/rust/src". Current value ""/home/thor/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd""

Process *async-racer* exited abnormally with code 1

stderr:

Process *async-racer* stderr finished

update: Actually, this is probably a racer problem, not a racer emacs problem, since autocomplete doesn't work from the command line either. But I'd be excited if the maintainer would be able to tell me what to change my RUST_SRC_PATH should be.