rls icon indicating copy to clipboard operation
rls copied to clipboard

Windows 10 VSCode RLS not detecting cargo packages.

Open InterestingBrainPoops opened this issue 5 years ago • 0 comments

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);
}

InterestingBrainPoops avatar Mar 13 '21 00:03 InterestingBrainPoops