<p dir="auto">This was a recent regression.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="extern &quot;C&quot; fn main() {}"><pre class="notranslate"><span class="pl-k">extern</span> <span class="pl-s">"C"</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">gives</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="extern-rust.rs:1:0: 1:23 error: main function expects type: `fn()`: expected &quot;Rust&quot; fn but found &quot;C&quot; fn
extern-rust.rs:1 extern &quot;C&quot; fn main() {}
                 ^~~~~~~~~~~~~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate">extern-rust.rs:1:0: 1:23 error: main function expects type: `fn()`: expected "Rust" fn but found "C" fn
extern-rust.rs:1 extern "C" fn main() {}
                 ^~~~~~~~~~~~~~~~~~~~~~~
</code></pre></div>
<p dir="auto">but changing the <code class="notranslate">"C"</code> to a <code class="notranslate">"Rust"</code> as the error message implies might work gives</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="extern-rust.rs:1:0: 1:26 error: main function expects type: `fn()`: expected impure fn but found extern fn
extern-rust.rs:1 extern &quot;Rust&quot; fn main() {}
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate">extern-rust.rs:1:0: 1:26 error: main function expects type: `fn()`: expected impure fn but found extern fn
extern-rust.rs:1 extern "Rust" fn main() {}
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre></div>
<p dir="auto">which is peculiar because it doesn't pass the entry-point-type-checker (although it'd hit <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="23566062" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/10763" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/10763/hovercard" href="https://github.com/rust-lang/rust/issues/10763">#10763</a> even if it did), and it mentions <code class="notranslate">impure fn</code> even though this is now essentially a historical implementation detail of the AST (after the removal of <code class="notranslate">pure fn</code>).</p>