racer-rust / emacs-racer

Racer support for Emacs
399 stars 48 forks source link

racer failed on nightly rustc 1.47.0-nightly (8e21bd063 2020-08-14) #138

Closed gotope closed 3 years ago

gotope commented 4 years ago

macOS, emacs26.3, nightly-x86_64-apple-darwin unchanged - rustc 1.47.0-nightly (8e21bd063 2020-08-14)

$ls $RUST_SRC_PATH/.. Cargo.lock library $ echo $RUST_SRC_PATH /Users/pok/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library $ls $RUST_SRC_PATH/ alloc panic_unwind rustc-std-workspace-alloc stdarch backtrace proc_macro rustc-std-workspace-core term core profiler_builtins rustc-std-workspace-std test panic_abort rtstartup std unwind

error info 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 ""/Users/pok/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/libstd""

jonas-hagen commented 3 years ago

Same problem here. This is caused by recent changes in rust source paths and racer not yet being aware of it: https://github.com/racer-rust/racer/issues/1125

demont93 commented 3 years ago

Changing rust-src-path from "$(rustc --print sysroot)/lib/rustlib/src/rust/src" to "$(rustc --print sysroot)/lib/rustlib/src/rust/library" fixed it for me.