racer-rust / racer

Rust Code Completion utility
MIT License
3.36k stars 278 forks source link

unwrap on None in metadata.rs on calling find def #1134

Open thor314 opened 3 years ago

thor314 commented 3 years ago

I can reproduce this error for any find-definition. debug:


$ cd /home/thor/r/parity-common/ethbloom/
$ export CARGO_HOME=/home/thor/.cargo
$ export RUST_SRC_PATH=/home/thor/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library
$ /home/thor/.cargo/bin/racer find-definition 74 26 /home/thor/r/parity-common/ethbloom/src/lib.rs /tmp/racerPMtBCu

This command terminated with exit code 101.

stdout:

Process *async-racer* exited abnormally with code 101

stderr:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/thor/.cargo/registry/src/github.com-1ecc6299db9ec823/racer-2.1.39/src/racer/metadata.rs:51:58
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace