I programming guessing game from book https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html however i have errors.
error[E0432]: unresolved import
rand
--> src\main.rs:1:5
|
1 | use rand::Rng;
| ^^^^ use of undeclared type or modulerand
error[E0433]: failed to resolve: use of undeclared type or module
rand
--> src\main.rs:8:25
|
8 | let secret_number = rand::thread_rng().gen_range(1, 101);
| ^^^^ use of undeclared type or modulerand
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0432, E0433.
For more information about an error, tryrustc --explain E0432
.
error: could not compileproba
.
Code is the same how in documentation. Please help. Sorry for my bad language.