rust-analyzer / rust-analyzer.github.io

https://rust-analyzer.github.io/
87 stars 52 forks source link

adding dependencies breaks some completions #128

Closed johnw42 closed 3 years ago

johnw42 commented 3 years ago

I've been using rust-analyzer through VSCode and I keep encountering situations where adding a dependency causes some completions to stop working. I've attached the smallest example I could find, where completing the word "info" in main.rs should suggest log::info, and it does if either x11 or clap is removed from the dependencies, but with both dependencies in place, the only suggestions are std::panic::PanicInfo and a bunch of types from x11 whose names end in Info.

I'm using the following versions:

VSCode: 1.58.0 2d23c42a936db1c7b3b06f918cde29561cc47cd6 rust-analyzer extension: 0.2.662 rust-analyzer e5c1c8cf2 2021-07-05 stable cargo 1.52.0 (69767412a 2021-04-21) rustc 1.52.1 (9bc8c42bb 2021-05-09)

example.tar.gz

johnw42 commented 3 years ago

Oops, just realized I filed this issue in the wrong place.