racer-rust / emacs-racer

Racer support for Emacs
399 stars 48 forks source link

racer-describe always fails with 'no function or type found at point' #130

Open Znapi opened 5 years ago

Znapi commented 5 years ago

racer-describe always fails with 'no function or type found at point' being displayed in the minibuffer, no matter if I run racer-describe on a type I define in the file or a standard library type like Vec. Running M-x racer-debug says:

This command terminated with exit code 0.

stdout:

PREFIX 17013,17016,Vec
END

Process *async-racer* finished

stderr:

thread 'searcher' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
ERROR 2019-06-30T20:48:49.784813000Z: racer: Search thread panicked: Any

Process *async-racer* stderr finished

If I copy paste the command that the racer-debug page says should reproduce the same output into a terminal, the command succeeds and returns the correct documentation.

With RUST_BACKTRACE=1, the output of racer-debug is:

This command terminated with exit code 0.

stdout:

PREFIX 3374,3377,Vec
END

stderr:

thread 'searcher' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21
stack backtrace:
   0: std::panicking::default_hook::{{closure}}
   1: std::panicking::default_hook
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::continue_panic_fmt
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::panicking::panic
   7: racer::metadata::MetadataCache::setup
   8: <racer::metadata::MetadataCache as racer::project_model::ProjectModelProvider>::edition
   9: racer::fileres::search_crate_names
  10: racer::nameres::resolve_name
  11: racer::nameres::resolve_path
  12: racer::core::complete_from_file_
  13: racer::core::complete_from_file
  14: racer::run_the_complete_fn
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
ERROR 2019-06-30T21:05:45.530752000Z: racer: Search thread panicked: Any