<p dir="auto">There are many examples in the docs that require some adjustments to get to compile, e.g. the following requires a <code class="notranslate">main</code> function:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let a = [0];
let b = [1];
let mut it = a.iter().chain(b.iter());
assert_eq!(it.next().get(), &amp;0);
assert_eq!(it.next().get(), &amp;1);
assert!(it.next().is_none());"><pre class="notranslate"><span class="pl-k">let</span> a = <span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> b = <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> <span class="pl-k">mut</span> it = a<span class="pl-kos">.</span><span class="pl-en">iter</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">chain</span><span class="pl-kos">(</span>b<span class="pl-kos">.</span><span class="pl-en">iter</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">assert_eq</span><span class="pl-en">!</span><span class="pl-kos">(</span>it.next<span class="pl-kos">(</span><span class="pl-kos">)</span>.get<span class="pl-kos">(</span><span class="pl-kos">)</span>, &amp;<span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">assert_eq</span><span class="pl-en">!</span><span class="pl-kos">(</span>it.next<span class="pl-kos">(</span><span class="pl-kos">)</span>.get<span class="pl-kos">(</span><span class="pl-kos">)</span>, &amp;<span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">assert</span><span class="pl-en">!</span><span class="pl-kos">(</span>it.next<span class="pl-kos">(</span><span class="pl-kos">)</span>.is_none<span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">(<code class="notranslate">Iterator.chain</code> at the time of filing.)</p>
<p dir="auto">And others that are entirely self-contained, and can just be copy-pasted to be run.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use std::rand;

fn main () {
    let tuple_ptr = rand::random::&lt;~(f64, char)&gt;();
    printfln!(tuple_ptr)
}"><pre class="notranslate"><span class="pl-k">use</span> std<span class="pl-kos">::</span>rand<span class="pl-kos">;</span>

<span class="pl-k">fn</span> <span class="pl-en">main</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">let</span> tuple_ptr = rand<span class="pl-kos">::</span><span class="pl-en">random</span><span class="pl-kos">::</span><span class="pl-kos">&lt;</span>~<span class="pl-kos">(</span><span class="pl-smi">f64</span><span class="pl-kos">,</span> <span class="pl-smi">char</span><span class="pl-kos">)</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-en">printfln</span><span class="pl-en">!</span><span class="pl-kos">(</span>tuple_ptr<span class="pl-kos">)</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">(One of the examples at the top of <code class="notranslate">std::rand</code>.)</p>
<p dir="auto">It seems like it would be good to be consistent about this. I prefer the latter, and it would make automatically running the tests much easier (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="5625118" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/2925" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/2925/hovercard" href="https://github.com/rust-lang/rust/issues/2925">#2925</a>).</p>
<p dir="auto">Hello All,</p>
<p dir="auto">Just stumbled upon</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="...
compile_and_link: x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd.so
error: unknown debug flag: no-debug-borrows
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: the compiler hit an unexpected failure path. this is a bug
task 'rustc' failed at 'explicit failure', /mnt/disk2/opt/pkgs/rust/src/librustc/driver/driver.rs:1137"><pre class="notranslate"><code class="notranslate">...
compile_and_link: x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd.so
error: unknown debug flag: no-debug-borrows
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: the compiler hit an unexpected failure path. this is a bug
task 'rustc' failed at 'explicit failure', /mnt/disk2/opt/pkgs/rust/src/librustc/driver/driver.rs:1137
</code></pre></div>
<p dir="auto">Additional information:</p>
<p dir="auto">Top of tree:<br>
latest<br>
commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/f8477c9da5ed784f5981611b6c12623cd2b44806/hovercard" href="https://github.com/rust-lang/rust/commit/f8477c9da5ed784f5981611b6c12623cd2b44806"><tt>f8477c9</tt></a></p>
<p dir="auto">duplicates the bug<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="26042147" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/11707" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/11707/hovercard" href="https://github.com/rust-lang/rust/issues/11707">#11707</a></p>
<p dir="auto">Thanks</p>