racer: External crate completions don't work without extern crate declaration

Steps to repoduce:

  1. Create a new project: cargo new temp
  2. Add a dependency, e.g. rand = "0.6.5"
  3. cargo build
  4. Try to complete use rand:: (I tested it with vim). It won’t work.
  5. Add extern crate rand; and try again. It will.

Versions:

racer v2.1.19
rustc 1.34.0-nightly (146aa60f3 2019-02-18)
Linux

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17

Most upvoted comments

This is an issue for me now:

cargo 1.38.0-nightly (e853aa976 2019-08-09)
rustc 1.38.0-nightly (c43d03a19 2019-08-14)
racer 2.1.25

Only std can be completed. No external crates after cargo build, not even with extern crate ... declaration.