Closed philshafer closed 3 years ago
See also #140 and #141
There's no "libstd" under rust/library, but this does silence the error.
Unfortunately, racer still doesn't work, even for items in the current source tree. I get "No definition found" for any token in emacs:
The last racer command was:
$ cd /Volumes/case/work/foghorn/rust/sxd-xpath/
$ export CARGO_HOME=/Users/phil/.cargo
$ export RUST_SRC_PATH=/Users/phil/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library
$ /Users/phil/.cargo/bin/racer find-definition 26 22 /Users/phil/work/foghorn/rust/sxd-xpath/src/lib.rs /var/folders/j6/xzl2vjp53g38g6prvblcyhdw0000gn/T/racercX3svV
This command terminated with exit code 0.
stdout:
END
Process *async-racer* finished
stderr:
Process *async-racer* stderr finished
The temporary file will have been deleted. You should be
able to reproduce the same output from racer with the
following command:
$ CARGO_HOME=/Users/phil/.cargo RUST_SRC_PATH=/Users/phil/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library /Users/phil/.cargo/bin/racer find-definition 26 22 /Users/phil/work/foghorn/rust/sxd-xpath/src/lib.rs
Please report bugs on GitHub.
When I run via command line, I just get "END":
% env RUST_SRC_PATH=`pwd`/rust/library/ /Users/phil/.cargo/bin/racer -i text find-definition 20 38 /Users/phil/work/foghorn/rust/sxd-xpath/src/lib.rs
END
Is there an older or non-nightly I could install?
Thanks, Phil
@philshafer I fixed the same issues in #144.
This is a nice fix for setting the RUST_SRC_PATH, but even with that I'm seeing "racer find-definition" fail to return useful information, as you see when it's run via command line:
% env RUST_SRC_PATH=`pwd`/rust/library/ /Users/phil/.cargo/bin/racer -i text find-definition 20 38 /Users/phil/work/foghorn/rust/sxd-xpath/src/lib.rs
END
I'm not sure why using /library/ silences the error, even though there's no /library/libstd/ directory.
Thanks, Phil
Doh! never mind; my test case was in a doc comment. It's working on normal code.
Thanks, Phil
Per the instructions, I've done the "rustup component add rust-src", but the ~/.rustup/toolchain/*/lib/rustlib/src/rust/directory has no "src" subdirectory. I've "git cloned"d the real sources into this directory, but there's no "libstd" directory.
Where is "libstd" supposed to come from? I do see a "library/std" under the rust git clone, but no libstd.
Thanks, Phil
Additional details:
I've not set racer-rust-src-path; it has the value:
Same results where run by hand: