title: error: cannot move out of borrowed content for self field
body: <p>Here is my code:</p>
  
  <pre><code>struct Node&lt;T&gt; {
      data: T,
      next: Option&lt;Box&lt;Node&lt;T&gt;&gt;&gt;,
  }
  
  impl&lt;T&gt; Node&lt;T&gt; {
      fn new(data : T) -&gt; Node&lt;T&gt; {
          Node { data: data, next: None } 
      }
      fn new_with_next(data: T, next: Option&lt;Box&lt;Node&lt;T&gt;&gt;&gt;) -&gt; Node&lt;T&gt; {
          Node { data: data, next: next }
      }
  }
  
  
  struct LinkedList&lt;T&gt; {
      head: Box&lt;Node&lt;T&gt;&gt;,
      size: u8,
  }
  
  impl&lt;T&gt; LinkedList&lt;T&gt; {
      fn new(data: T) -&gt; LinkedList&lt;T&gt; {
          let new_node = Node::new(data);
          let head = Box::new(new_node);
          LinkedList { head: head, size: 1 }
      }
      fn insert(&amp;mut self, data: T) {
          let mut next = Some(self.head);    // &lt;-- error here
          let new_node = Node::new_with_next(data, next);
          self.head = Box::new(new_node);
          self.size += 1;
      }
  }
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>src\linked_list.rs:28:29: 28:33 error: cannot move out of borrowed content [E0507]
  src\linked_list.rs:28         let next = Some(self.head);
                                                ^~~~
  </code></pre>
  
  <p>I don't understand the error, nor how to fix it. I tried giving a reference to <code>self.head</code> to <code>Some</code>, however I'm changing the data type this inside <code>Some</code> this way.</p>