I Got error plz help



Did you forget match?

let guess: u32 = match guess.trim().parse() { ...};



Ohh yaaa …Thnks


i’m new to rust will you suggest any book to read other than docs . i think docs are littile bit hard.


Have you tried the book?

Please from now on do not post screen-shots of code, they are not a good way to get other people interested in helping you. Maybe make a gist of the code you want to share.


yaa i tried but it’s complex . and sorry for screen shots . but i don’t know what is gist ? , i wan’t to learn rust from the begining but in “the book” there is just a program’s and it’s explanation not complete referance like c or c++ .


yaa i tried but it’s complex

You can cut&paste from your editor of choice (is that Emacs in the screenshot?). As long as the code is indented with at least 4 spaces it should work (like this):

let guess: u32 = match guess.trim().parse() {
        Ok(num) => num,
        Err(_) => continue,


A gist is a piece of code, hostet on gist.GitHub.

It is easy to edit and reupload it so it is often used.

The service can also be used without registering.


Do you use triple backticks? If you do so your code will be syntax highlighted.

fn main() {

Like this:

fn main() {

This is also possible for other languages like C:

int main(void)


int main(void)


Thank you ,no it’s VIM editor.


i just use vim and set it’s color on , add some plugin’s and it’s cool for rust as IDE .


Then you might want to have a look at the gist plugin for vim.


On the first page of the book, there’s a paragraph that says:

After reading this introduction, you’ll want to dive into either ‘Learn Rust’
or ‘Syntax and Semantics’, depending on your preference: ‘Learn Rust’ if you
want to dive in with a project, or ‘Syntax and Semantics’ if you prefer to
start small, and learn a single concept thoroughly before moving onto the next.

It sounds like you might be looking for the Syntax and Semantics section. The book is written for many different learning styles.