title: Why is the "move" keyword necessary when it comes to threads; why would I ever not want that behavior?
body: <p>For example (taken from <a href="https://doc.rust-lang.org/book/ch16-01-threads.html#using-move-closures-with-threads" rel="noreferrer">the Rust docs</a>):</p>
  
  <pre class="lang-rust prettyprint-override"><code>let v = vec![1, 2, 3];
  let handle = thread::spawn(move || {
      println!("Here's a vector: {:?}", v);
  });
  </code></pre>
  
  <p>This is not a question about <em>what</em> <code>move</code> does, but about <em>why it is necessary to specify</em>.</p>
  
  <p><em>In cases where you want the closure to take ownership of an outside value</em>, would there ever be a reason not to use the <code>move</code> keyword? If <code>move</code> is <em>always</em> required in these cases, is there any reason why the presence of <code>move</code> couldn't just be implied/omitted? For example:</p>
  
  <pre class="lang-rust prettyprint-override"><code>let v = vec![1, 2, 3];
  let handle = thread::spawn(/* move is implied here */ || {
      // Compiler recognizes that `v` exists outside of this closure's
      // scope and does black magic to make sure the closure takes
      // ownership of `v`.
      println!("Here's a vector: {:?}", v);
  });
  </code></pre>
  
  <p>The above example gives the following compile error:</p>
  
  <pre class="lang-none prettyprint-override"><code>closure may outlive the current function, but it borrows `v`, which is owned by the current function
  </code></pre>
  
  <p>When the error magically goes away simply by adding <code>move</code>, I can't help but wonder to myself: why would I ever <em>not</em> want that behavior?</p>
  
  <hr>
  
  <p>I'm not suggesting anything is wrong with the required syntax. I'm just trying to gain a deeper understanding of <code>move</code> from people who understand Rust better than I do. :)</p>