title: What are the differences when getting an immutable reference from a mutable reference with self-linked lifetimes?
body: <pre><code>struct Foo01&lt;'a&gt; {
      val: u32,
      str: &amp;'a String,
  }
  
  fn mutate_and_share_01&lt;'a&gt;(foo: &amp;'a mut Foo01&lt;'a&gt;) -&gt; &amp;'a Foo01&lt;'a&gt; {
      foo
  }
  
  fn mutate_and_share_02&lt;'a&gt;(foo: &amp;'a mut Foo01&lt;'a&gt;) -&gt; &amp;'a Foo01 {
      foo
  }
  
  fn mutate_and_share_03&lt;'a&gt;(foo: &amp;'a mut Foo01) -&gt; &amp;'a Foo01&lt;'a&gt; {
      foo
  }
  
  fn main() {
      let mut foo = Foo01 { val: 16, str: &amp;String::from(&quot;Hello &quot;) };
      let foo_mut = &amp;mut foo;
  
      //let loan = mutate_and_share_01(foo_mut);
      //let loan2 = mutate_and_share_01(foo_mut); //error
  
      //let loan = mutate_and_share_02(foo_mut);
      //let loan2 = mutate_and_share_02(foo_mut); //error
  
      let loan = mutate_and_share_03(foo_mut);
      let loan2 = mutate_and_share_03(foo_mut); //good
  }
  </code></pre>
  <p>What are differences between these <code>mutate_and_share</code> versions?</p>