title: Taking ownership of a variable in a function mutably
body: <p>Is it possible to take a mutable ownership of a variable and if so how? Here is an example of what I mean (it does not compile):</p>
  
  <pre><code>fn read_all_input&lt;I: Iterator&lt;u8&gt;&gt;(dont_use_after: mut I) -&gt; SuperReturn {
    //This function will consume all the iterator and therefore wants to TAKE it away
    //from the user, not borrow it.
  }
  
  fn main() {
    //Somehow get an iter.
    let mut myIter = ...;
    //Pass it to the function.
    read_all_input(myIter);
    //Make the compiler cry here.
    let x = myIter.next();
  }
  </code></pre>
  
  <p>I know I can take a mutable reference but I would prefer to move the iterator into the function and doing so MUTABLY (for loops require mutable iterators of course).</p>
  
  <p>Thanks,
  Phil</p>