Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uknown type after adding new crate: Requires restarting VScode #4918

Closed
bergkvist opened this issue Jun 17, 2020 · 1 comment
Closed

Uknown type after adding new crate: Requires restarting VScode #4918

bergkvist opened this issue Jun 17, 2020 · 1 comment

Comments

@bergkvist
Copy link

bergkvist commented Jun 17, 2020

When I add a new crate, crate types will show as unknown.

To get rust-analyzer to infer the types, I need to restart VSCode.

Would be nice if this was dealt with automatically, without having to restart VSCode after every added crate.

How to reproduce:

  1. Start VSCode with rust-analyzer
  2. Add a crate to Cargo.toml (like roxmltree = "0.11.0")
  3. Import the crate in main.rs (use roxmltree;) and compile once to download/compile the crate.
  4. rust-analyzer is not able to infer types of roxmltree (displaying {unknown})
  5. Restart VSCode
  6. Now, types are correctly inferred
@bjorn3
Copy link
Member

bjorn3 commented Jun 17, 2020

This is #3715.

@bjorn3 bjorn3 closed this as completed Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants