title: “error: expected item, found 'let'”
body: <p>I have a code dump where i put examples for rust code in case I forget something. I keep getting <code>error: expected item, found 'let'</code> for line 41+. 
  could it be my code isn't structured properly? I simply pasted snips of code I learned about into the main.rs. I suppose enums have some sort of special formatting or place.</p>
  
  <p>I tried changing the names, thinking it was name convention; but that didn't help. Same error.</p>
  
  <p>Here's the dump (not that big actually yet)</p>
  
  <pre><code>#[allow(dead_code)]
  
  
  fn main()
  {
  
  }
  
  
  
  
  
  /////////////////////////////////////////tutorial functoins i made
  
  fn if_statements()
  {
      //let (x, y) = (5, 10);
      let x = 5;
      let y = if x == 5 { 10 } else { 15 };
          if y == 15 {println!("y = {}", y);}
  }
  
  
  
  ////////////////////////////////////////// tutoiral functions
  #[allow(dead_code)]
  fn add(a: i32, b: i32) -&gt; i32
  {
      a + b
  
  }
  
  #[allow(dead_code)]
  fn crash(exception: &amp;str) -&gt; !
  {
      panic!("{}", exception);
  }
  
  
  //TUPLES//
  let y = (1, "hello");
  let x: (i32, &amp;str) = (1, "hello");
  
  //STRUCTS//
  struct Point {
      x: i32,
      y: i32,
  }
  
  fn structs() {
      let origin = Point { x: 0, y: 0 }; // origin: Point
  
      println!("The origin is at ({}, {})", origin.x, origin.y);
  }
  
  //ENUMS//
  enum Character {
      Digit(i32),
      Other,
  }
  
  let ten  = Character::Digit(10);
  let four = Character::Digit(4);
  </code></pre>