<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="let f = &amp;[99]; println!(&quot;{:?}&quot;, match [1,2,3,4] { [x, ..xs] =&gt; (x, xs), [] =&gt; (9, f) });"><pre class="notranslate"><code class="notranslate">let f = &amp;[99]; println!("{:?}", match [1,2,3,4] { [x, ..xs] =&gt; (x, xs), [] =&gt; (9, f) });
</code></pre></div>
<p dir="auto">Says</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="vectors of length 4 not covered"><pre class="notranslate"><code class="notranslate">vectors of length 4 not covered
</code></pre></div>
<p dir="auto">Should say</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pattern [] is unreachable"><pre class="notranslate"><code class="notranslate">pattern [] is unreachable
</code></pre></div>
<p dir="auto">Compiling the following code (with current master) results in "error: non-exhaustive patterns: vectors of length 2 not covered". I don't know if this ought to be valid, but at least the error-message is wrong, because obviously there is a match-branch for vectors of length 2.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
  let x = [1,2];
  let y = match x {
    [] =&gt; None,
    [a,_] =&gt; Some(a)
  };
  println!(&quot;{}&quot;, y);            
}"><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> x = <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
  <span class="pl-k">let</span> y = <span class="pl-k">match</span> x <span class="pl-kos">{</span>
    <span class="pl-kos">[</span><span class="pl-kos">]</span> =&gt; <span class="pl-v">None</span><span class="pl-kos">,</span>
    <span class="pl-kos">[</span>a<span class="pl-kos">,</span>_<span class="pl-kos">]</span> =&gt; <span class="pl-v">Some</span><span class="pl-kos">(</span>a<span class="pl-kos">)</span>
  <span class="pl-kos">}</span><span class="pl-kos">;</span>
  <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{}"</span>, y<span class="pl-kos">)</span><span class="pl-kos">;</span>            
<span class="pl-kos">}</span></pre></div>