<p dir="auto">See <a href="http://is.gd/SH4nll" rel="nofollow">http://is.gd/SH4nll</a></p>
<p dir="auto">This fails to print anything since <code class="notranslate">"hey"</code> in only written to the buffer and then never printed. Other <code class="notranslate">BufWriter</code>s <a href="https://github.com/rust-lang/rust/blob/master/src/libstd/io/buffered.rs#L213-L221">flush on drop</a> but this isn't happening for <code class="notranslate">Stdout</code> at program exit.</p>
<p dir="auto">I know that the new IO is being worked on, but I could see this being a sneaky thing that gets lost.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(io)]
use std::io::Write;
fn main() {
    write!(&amp;mut std::io::stdout(), &quot;Hello world&quot;).unwrap();
}"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>io<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">use</span> std<span class="pl-kos">::</span>io<span class="pl-kos">::</span><span class="pl-v">Write</span><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-en">write</span><span class="pl-en">!</span><span class="pl-kos">(</span>&amp;<span class="pl-k">mut</span> std::io::stdout<span class="pl-kos">(</span><span class="pl-kos">)</span>, <span class="pl-s">"Hello world"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">unwrap</span><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">This code prints nothing. If we use <code class="notranslate">stderr</code> instead, there is output.</p>
<p dir="auto"><code class="notranslate">rustc 1.0.0-nightly (270a677d4 2015-03-07) (built 2015-03-07)</code></p>