<p dir="auto">The code</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {}
// ...
// lots of code
// ...
fn some_random_function() {
    // lots of code here
    let unused = vec![];
    // even more code
}"><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-c">// ...</span>
<span class="pl-c">// lots of code</span>
<span class="pl-c">// ...</span>
<span class="pl-k">fn</span> <span class="pl-en">some_random_function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-c">// lots of code here</span>
    <span class="pl-k">let</span> unused = <span class="pl-en">vec</span><span class="pl-en">!</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
    <span class="pl-c">// even more code</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">gives an error message which does not even hint about the error's location:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;std macros&gt;:5:9: 5:22 error: unable to infer enough type information about `_`; type annotations required
&lt;std macros&gt;:5         xs.into_vec()
                       ^~~~~~~~~~~~~
&lt;std macros&gt;:1:1: 8:2 note: in expansion of vec!
&lt;anon&gt;:4:5: 4:12 note: expansion site"><pre class="notranslate"><code class="notranslate">&lt;std macros&gt;:5:9: 5:22 error: unable to infer enough type information about `_`; type annotations required
&lt;std macros&gt;:5         xs.into_vec()
                       ^~~~~~~~~~~~~
&lt;std macros&gt;:1:1: 8:2 note: in expansion of vec!
&lt;anon&gt;:4:5: 4:12 note: expansion site
</code></pre></div>
<p dir="auto">Which makes finding the offending statement require quite a bit of effort.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn main() {
    let a = Vec::new();
}"><pre class="notranslate"><code class="notranslate">fn main() {
    let a = Vec::new();
}
</code></pre></div>
<p dir="auto">Gives me:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;anon&gt;:2:13: 2:21 error: unable to infer enough type information about `_`; type annotations required [E0282]
&lt;anon&gt;:2     let a = Vec::new();
                     ^~~~~~~~"><pre class="notranslate"><code class="notranslate">&lt;anon&gt;:2:13: 2:21 error: unable to infer enough type information about `_`; type annotations required [E0282]
&lt;anon&gt;:2     let a = Vec::new();
                     ^~~~~~~~
</code></pre></div>
<p dir="auto">This is confusing because it doesn't say what the <code class="notranslate">_</code> is that it can't figure out. Perhaps it could say something like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Only able to infer that `a` has type `Vec&lt;_&gt;`; please annotate so I can figure out what `_` is."><pre class="notranslate"><code class="notranslate">Only able to infer that `a` has type `Vec&lt;_&gt;`; please annotate so I can figure out what `_` is.
</code></pre></div>