title: rust: cannot move out of indexed context
body: <p>I'm very new to rust, and am starting to get the hang of the ownership system and such, but am still having some hangups. For exmaple, I have the following code: </p>
  
  <pre><code>fn main() {
      let mut t = vec![Box::new(4)];
      let mut o = t[0];
      *o = *o + 1;
      t[0] = o;
      println!("t[0]:{}", t[0]);
  }
  </code></pre>
  
  <p>Which gives me the <code>cannot move out of indexed content</code> error for the line where I'm initializing <code>o</code>. I understand <em>why</em> this is happening, I think, but I can't figure out what I'm supposed to do instead to accomplish the same thing. This is a very simplified case, but any help would be greatly appreciated. Thanks!</p>