s or foo/mod.rs
pub fn bar() { println!(&quot;...&quot;); }
/* ... */
}</span><pre class='rust rust-example-rendered'>
<span class='kw'>pub</span> <span class='kw'>mod</span> <span class='ident'>foo</span>;

<span class='comment'>// in foo.rs or foo/mod.rs</span>
<span class='kw'>pub</span> <span class='kw'>fn</span> <span class='ident'>bar</span>() { <span class='macro'>println</span><span class='macro'>!</span>(<span class='string'>&quot;...&quot;</span>); }
<span class='comment'>/* ... */</span></pre>

<