title: How do I destructure a tuple so that the bindings are mutable?
body: <p>If I have the following struct:</p>
  
  <pre><code>struct MyStruct { tuple: (i32, i32) };
  </code></pre>
  
  <p>And the following function:</p>
  
  <pre><code>// This will not compile
  fn function(&amp;mut struct: MyStruct) {
      let (val1, val2) = struct.tuple;
      val1 = 1;
      val2 = 2;
  }
  </code></pre>
  
  <p>How do I borrow val1 and val2 as mutable so when I reassign them the changes appear in the original struct?</p>