rls
rls copied to clipboard
Windows 10 VSCode RLS not detecting cargo packages.
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:
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);
}