title: As I can make the vector is mutable inside struct
body: <p>As I can make the vector is mutable </p>
  
  <pre><code>pub struct Test&lt;'a&gt;{
      vec: &amp;'a mut Vec&lt;i32&gt;,
  }
  impl&lt;'a&gt; Test&lt;'a&gt; {
      pub fn created()-&gt;Test&lt;'a&gt;{
          Test {vec: &amp;'a mut Vec::new() }
      }
      pub fn add(&amp;self, value: i32){  
          self.vec.push(value);
      }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>expected `:`, found `mut`
  Test {vec: &amp;'a mut Vec::new() }
                 ^~~
  </code></pre>
  
  <p>This is a <a href="https://stackoverflow.com/questions/29415521/how-to-use-mutable-member-vec">similar question</a> but </p>
  
  <p>and the answer works, but what if I do not want, you can do this, "applying the response link"</p>
  
  <pre><code>pub struct Test{
      vec: Vec&lt;i32&gt;,
  }
  impl Test {
      pub fn created()-&gt;Test {
          Test {vec: Vec::new() }
      }
      pub fn add(&amp;mut self, value: i32){  
          self.vec.push(value);
      }
  }
  ..//
  let mut test: my::Test = my::Test::created();
  test.add(1i32);
  
  let mut test1: my::Test = my::Test::created();
  
  test1 = test; &lt;-- I do not want, you can do this
  ..//
  </code></pre>
  
  <p>as I can make the vector is mutable, without making it be all the struct</p>