wned = &quot;Hello&quot;.to_string();
let counted = Rc::new(owned);

// // therefore, this works:
// ゆえに、以下のコードは正しく動作します:
foo(&amp;counted);
}</span><pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>rc</span>::<span class='ident'>Rc</span>;

<span class='kw'>fn</span> <span class='ident'>foo</span>(<span class='ident'>s</span>: <span class='kw-2'>&amp;</span><span class='ident'>str</span>) {
      <s