Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Windows 10 VSCode RLS not detecting cargo packages. #1724

Open
InterestingBrainPoops opened this issue Mar 13, 2021 · 0 comments
Open

Windows 10 VSCode RLS not detecting cargo packages. #1724

InterestingBrainPoops opened this issue Mar 13, 2021 · 0 comments

Comments

@InterestingBrainPoops
Copy link

I installed rls while im getting started with rust, and Ive installed the rand package, and it builds just fine with cargo.
However its showing me the following error and not letting me use code completion:
image
The same errors popup when I use rustc instead of cargo build/run.

use std::io;
use rand::Rng;

fn main() {
    println!("Guess the number!");

    let secret_number = rand::thread_rng().gen_range(1..101);

    println!("The secret number is: {}", secret_number);

    println!("Please input your guess.");

    let mut guess = String::new();

    io::stdin()
        .read_line(&mut guess)
        .expect("Failed to read line");

    println!("You guessed: {}", guess);
}
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

1 participant