<p dir="auto">Rather than just having the current [src] link at the top of the doc pages, it'd be nice to be able to have a [src] link for each function that expands with a code snippet of that particular function. Just like what the [-] and [+] buttons already do for the markdown comments.</p>
<p dir="auto">It'd be a really helpful learning tool to be able to jump directly to the code you want to use and see what it's actually doing behind the scenes. It could also help people to get acquainted enough with the core code base to start making useful contributions. :)</p>
<p dir="auto">Test case:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#[crate_id=&quot;foo&quot;];
pub struct Foo;

impl Foo {
    #[unstable] pub fn foo(&amp;self) {}
}"><pre class="notranslate"><span class="pl-c1">#<span class="pl-kos">[</span>crate_id=<span class="pl-s">"foo"</span><span class="pl-kos">]</span></span><span class="pl-kos">;</span>
<span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">Foo</span><span class="pl-kos">;</span>

<span class="pl-k">impl</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
    <span class="pl-c1">#<span class="pl-kos">[</span>unstable<span class="pl-kos">]</span></span> <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-smi">self</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>