ss='string'>&quot;{}&quot;</span>, <span class='ident'>as_str</span>::<span class='op'>&lt;</span><span class='lifetime'>&#39;d</span><span class='op'>&gt;</span>(<span class='kw-2'>&amp;</span><span class='lifetime'>&#39;d</span> <span class='ident'>x</span>));
        }
    }
}</pre>

<p>Shoot!</p>

<p>Of course, the right way to write this function is as follows:</p>

<span class='rusttest'>fn main() {
    fn to_string(data: &amp;u32) -&gt; String {
    format!(&quot;{}&quot;, data)
}
}</span><pre class=