title: Why does a range that starts at a negative number not iterate?
body: <p>I have just started to learn <code>Rust</code>. During my first steps with this language, I found a strange behaviour, when an iteration is performed inside <code>main</code> or in another function as in following example:</p>
  
  <pre><code>fn myfunc(x: &amp;Vec&lt;f64&gt;) {
      let n = x.len();
      println!("    n: {:?}", n);
      for i in -1 .. n {
          println!("    i: {}", i);
      }
  }
  
  fn main() {
      for j in -1 .. 6 {
          println!("j: {}", j);
      }
  
      let field = vec![1.; 6];
      myfunc(&amp;field);
  }
  </code></pre>
  
  <p>While the loop in <code>main</code> is correctly displayed, nothing is printed for the loop inside <code>myfunc</code> and I get following output:</p>
  
  <pre><code>j: -1
  j: 0
  j: 1
  j: 2
  j: 3
  j: 4
  j: 5
      n: 6
  </code></pre>
  
  <p>What is the cause of this behaviour?</p>