<p dir="auto">The following code (as of commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/0012b5008b32543cf61a2beba36160c42f36d704/hovercard" href="https://github.com/rust-lang/rust/commit/0012b5008b32543cf61a2beba36160c42f36d704"><tt>0012b50</tt></a>) gives an internal compiler error <code class="notranslate">drop_ty_immediate: non-box ty</code>.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use std::rt::rtio::RtioTimer;
use std::rt::io::Timer;

fn main() {
    let maybe_timer = Timer::new();
    maybe_timer.expect(&quot;Expected a timer&quot;).sleep(1);
}"><pre class="notranslate"><span class="pl-k">use</span> std<span class="pl-kos">::</span>rt<span class="pl-kos">::</span>rtio<span class="pl-kos">::</span><span class="pl-v">RtioTimer</span><span class="pl-kos">;</span>
<span class="pl-k">use</span> std<span class="pl-kos">::</span>rt<span class="pl-kos">::</span>io<span class="pl-kos">::</span><span class="pl-v">Timer</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-k">let</span> maybe_timer = <span class="pl-smi">Timer</span><span class="pl-kos">::</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    maybe_timer<span class="pl-kos">.</span><span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s">"Expected a timer"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">sleep</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">It seems like this was broken as a result of the recent change to make newtypes structs immediate in certain cases.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="struct TestNode(@int);

fn mm(_x: &amp;TestNode) {}

fn main() {
    let x = &amp;TestNode(@21);
    mm(x);
}"><pre class="notranslate"><span class="pl-k">struct</span> <span class="pl-smi">TestNode</span><span class="pl-kos">(</span>@<span class="pl-smi">int</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-k">fn</span> <span class="pl-en">mm</span><span class="pl-kos">(</span><span class="pl-s1">_x</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-smi">TestNode</span><span class="pl-kos">)</span> <span class="pl-kos">{</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-k">let</span> x = <span class="pl-c1">&amp;</span><span class="pl-v">TestNode</span><span class="pl-kos">(</span>@<span class="pl-c1">21</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-en">mm</span><span class="pl-kos">(</span>x<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="% rustc foo.rs
error: internal compiler error: drop_ty_immediate: non-box ty"><pre class="notranslate"><code class="notranslate">% rustc foo.rs
error: internal compiler error: drop_ty_immediate: non-box ty
</code></pre></div>