title: Guessing game, error on shadowing guess bind
body: <p>I'm following the <a href="https://doc.rust-lang.org/book/guessing-game.html" rel="nofollow">Rust tutorial</a> but I'm stuck on this code (the last snippet in the page):</p>
  
  <pre><code>extern crate rand;
  
  use std::io;
  use std::cmp::Ordering;
  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);
  
      loop {
          println!("Please input your guess");
  
          let mut guess = String::new();
  
          io::stdin()
              .read_line(&amp;mut guess)
              .expect("Failed to read line");
  
          let guess: u32 = guess.trim().parse() {
              Ok(num) =&gt; num,
              Err(_) =&gt; continue,
          }
  
          println!("You guessed: {}", guess);
  
          match guess.cmp(&amp;secret_number) {
              Ordering::Less      =&gt; println!("Too small!"),
              Ordering::Greater   =&gt; println!("Too big!"),
              Ordering::Equal     =&gt; {
                  println!("You win!");
                  break;
              }
          }
      }
  }
  </code></pre>
  
  <p>When I run <code>cargo run</code> I have the following error:</p>
  
  <pre><code>src/main.rs:23:47: 23:48 error: expected one of `.`, `;`, or an operator, found `{`
  src/main.rs:23         let guess: u32 = guess.trim().parse() {
                                                               ^
  </code></pre>
  
  <p>What's the right syntax? </p>