<p dir="auto">This program is currently accepted:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use A::B;

mod A {
    pub struct B { n: int }
    fn B() { }
}

fn main() {
}"><pre class="notranslate"><span class="pl-k">use</span> <span class="pl-smi">A</span><span class="pl-kos">::</span><span class="pl-v">B</span><span class="pl-kos">;</span>

<span class="pl-k">mod</span> <span class="pl-v">A</span> <span class="pl-kos">{</span>
    <span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">B</span> <span class="pl-kos">{</span> <span class="pl-c1">n</span><span class="pl-kos">:</span> <span class="pl-smi">int</span> <span class="pl-kos">}</span>
    <span class="pl-k">fn</span> <span class="pl-v">B</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-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></pre></div>
<p dir="auto">but this program, which adds a use of <code class="notranslate">B()</code>, is not:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use A::B;

mod A {
    pub struct B { n: int }
    fn B() { }
}

fn main() {
    let _ = B();
}"><pre class="notranslate"><span class="pl-k">use</span> <span class="pl-smi">A</span><span class="pl-kos">::</span><span class="pl-v">B</span><span class="pl-kos">;</span>

<span class="pl-k">mod</span> <span class="pl-v">A</span> <span class="pl-kos">{</span>
    <span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">B</span> <span class="pl-kos">{</span> <span class="pl-c1">n</span><span class="pl-kos">:</span> <span class="pl-smi">int</span> <span class="pl-kos">}</span>
    <span class="pl-k">fn</span> <span class="pl-v">B</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-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> _ = <span class="pl-v">B</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">When there is a single import statement that imports multiple idents, and one of them is not found, then the resulting error points to the use site, not the import site.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import http_parser::{http_parser, http_parser_settings, http_parser_execute}; // http_parser_execute is not in the http_parser module

....

http_parser_execute(addr_of(self.parser));"><pre class="notranslate"><code class="notranslate">import http_parser::{http_parser, http_parser_settings, http_parser_execute}; // http_parser_execute is not in the http_parser module

....

http_parser_execute(addr_of(self.parser));
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./parser.rs:68:12: 68:31 error: unresolved name: http_parser_execute
./parser.rs:68             http_parser_execute(addr_of(self.parser),"><pre class="notranslate"><code class="notranslate">./parser.rs:68:12: 68:31 error: unresolved name: http_parser_execute
./parser.rs:68             http_parser_execute(addr_of(self.parser),
</code></pre></div>