Closed ccmtaylor closed 7 years ago
Duplicate of #53 I think. Let me know if I'm mistaken.
@Wilfred I don't think this is a duplicate. IIUC, the current behaviour falls back to /usr/local/src/rust/src
if neither $RUST_SRC_PATH
nor racer-rust-src-path
are set.
However, since phildawes/racer#598 landed, the racer
command automatically discovers the rust-src location by calling rustc --print sysroot
, which plays nicely with rustup's new capability to install rust sources.
My proposal is
$RUST_SRC_PATH
is set, use that.racer-rust-src-path
is non-nil, use that.This would simplify emacs-racer setup, since you don't need to configure anything if you use rustup.
If you like, I can try to hack up a PR, but I'm not experienced in elisp.
Done in #72.
Since phildawes/racer#598, racer has a sensible default for the rust source path. Emacs-racer could rely this and make
racer-rust-src-path
(and theRUST_SRC_PATH
environment variable) optional.