Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

RLS can't find rand crate #442

Closed
Itchy-Sand opened this issue Oct 29, 2018 · 3 comments
Closed

RLS can't find rand crate #442

Itchy-Sand opened this issue Oct 29, 2018 · 3 comments

Comments

@Itchy-Sand
Copy link

so I added the rand crate to my project as per the following:
extern crate rand;
use rand::Rng;

and now I'm getting 2 problems at the bottom status bar in VSCode.

  1. can'f find crate for 'rand' can't find crate
  2. miltiple matching crates for 'rand' note: candidates: 'rand'... and the path to the toolchains.

the code compiles without any problems and it's not affecting functionality, but I'm not sure where this is coming from and how severe this issue is.

@Itchy-Sand Itchy-Sand changed the title RLS can'r find rand crate RLS can't find rand crate Oct 29, 2018
@nrc
Copy link
Member

nrc commented Oct 31, 2018

Did you add it to Cargo.toml? The RLS watches Cargo.toml, so unless that changes it won't notice that a crate has been added.

@Itchy-Sand
Copy link
Author

Did you add it to Cargo.toml? The RLS watches Cargo.toml, so unless that changes it won't notice that a crate has been added.

actually no I didn't, I'll try that and let you know.

@n0manarmy
Copy link

n0manarmy commented Mar 13, 2019

My issue with this was related to Visual Studio Code and that in the cargo file I had:
rand = "*"

I moved my Cargo.toml import to reflect:
rand = "0.6.5"

Visual Studio Code stopped complaining about the import. I know this for this particular issue but hopefully google will bring someone else to this answer and it'll help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants