<p dir="auto">The following code:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
    [].iter();
}"><pre class="notranslate"><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-kos">[</span><span class="pl-kos">]</span><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></pre></div>
<p dir="auto">results in the following compiler error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test.rs:2:1: 2:3 error: internal compiler error: borrow-vec associated with bad sty: &amp;ty_err
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
test.rs:2       [].iter();
                ^~
task 'rustc' failed at 'explicit failure', /home/sami/Programmes/rust-git/src/rust/src/libsyntax/diagnostic.rs:76
task '&lt;main&gt;' failed at 'explicit failure', /home/sami/Programmes/rust-git/src/rust/src/librustc/lib.rs:396"><pre class="notranslate"><code class="notranslate">test.rs:2:1: 2:3 error: internal compiler error: borrow-vec associated with bad sty: &amp;ty_err
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
test.rs:2       [].iter();
                ^~
task 'rustc' failed at 'explicit failure', /home/sami/Programmes/rust-git/src/rust/src/libsyntax/diagnostic.rs:76
task '&lt;main&gt;' failed at 'explicit failure', /home/sami/Programmes/rust-git/src/rust/src/librustc/lib.rs:396
</code></pre></div>
<p dir="auto">I’m using revision <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/df41115213e851b9f23dfea3d6782dea5243a5d4/hovercard" href="https://github.com/rust-lang/rust/commit/df41115213e851b9f23dfea3d6782dea5243a5d4"><tt>df41115</tt></a> (2013-12-01), with <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/c6e934f44797fd482d79f7be481cac12a9804046/hovercard" href="https://github.com/rust-lang/rust/commit/c6e934f44797fd482d79f7be481cac12a9804046"><tt>c6e934f</tt></a> cherry-picked to make <code class="notranslate">make install</code> work (pull request 10753, now merged into master).</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
    let v = &amp;[];
    let it = v.iter();
}"><pre class="notranslate"><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> v = <span class="pl-c1">&amp;</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
    <span class="pl-k">let</span> it = v<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></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="vec-ice.rs:3:13: 3:14 error: internal compiler error: borrow-vec associated with bad sty: &amp;ty_err
vec-ice.rs:3     let it = v.iter();
                          ^"><pre class="notranslate"><code class="notranslate">vec-ice.rs:3:13: 3:14 error: internal compiler error: borrow-vec associated with bad sty: &amp;ty_err
vec-ice.rs:3     let it = v.iter();
                          ^
</code></pre></div>
<p dir="auto">(Doesn't happen with <code class="notranslate">.slice</code>.)</p>