��制されます。</p>

<span class='rusttest'>fn takes_slice(slice: &amp;str) {
    println!(&quot;Got: {}&quot;, slice);
}

fn main() {
    let s = &quot;Hello&quot;.to_string();
    takes_slice(&amp;s);
}
</span><pre class='rust rust-example-rendered'>
<span class='kw'>fn</span> <span class='ident'>takes_slice</span>(<span class='ident'>slice</span>: <span class='kw-2'>&amp;</span><span class='ident'>str</span>) {
    <span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&