title: How to initialize a variable with a lifetime?
body: <p>I have following code and don't know how to get it working:</p>
  
  <pre><code>fn new_int&lt;'a&gt;() -&gt; &amp;'a isize {
      &amp;5
  }
  
  fn main() {
      let x = new_int();
  }
  </code></pre>
  
  <p>Or another attempt:</p>
  
  <pre><code>fn new_int&lt;'a&gt;() -&gt; &amp;'a isize {
      let a: &amp;'a isize = &amp;5;
      a
  }
  
  fn main() {
      let x = new_int();
  }
  </code></pre>