<p dir="auto">e.g rust run "folder name"</p>
<p dir="auto">To replicate:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="% mkdir /tmp/iss5806_dir ; \
   echo '#[path = &quot;iss5806_dir&quot;] pub mod iss5806_mod;' &gt; /tmp/iss5806.rs ; \
   echo 'pub fn main() { println(&quot;Hello World&quot;); }' &gt;&gt; /tmp/iss5806.rs ; \
   RUST_LOG=rustc=1 rustc  /tmp/iss5806.rs
rust: task failed at 'explicit failure', /Users/fklock/Dev/Mozilla/rust.git/src/libstd/io.rs:928
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /Users/fklock/Dev/Mozilla/rust.git/src/librustc/rustc.rc:398
rust: domain main @0x7fd1c1814210 root task failed"><pre class="notranslate"><code class="notranslate">% mkdir /tmp/iss5806_dir ; \
   echo '#[path = "iss5806_dir"] pub mod iss5806_mod;' &gt; /tmp/iss5806.rs ; \
   echo 'pub fn main() { println("Hello World"); }' &gt;&gt; /tmp/iss5806.rs ; \
   RUST_LOG=rustc=1 rustc  /tmp/iss5806.rs
rust: task failed at 'explicit failure', /Users/fklock/Dev/Mozilla/rust.git/src/libstd/io.rs:928
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /Users/fklock/Dev/Mozilla/rust.git/src/librustc/rustc.rc:398
rust: domain main @0x7fd1c1814210 root task failed
</code></pre></div>
<p dir="auto">(Original report follows:)</p>
<p dir="auto">I had code like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#[cfg(target_os=&quot;macos&quot;)]
#[path = &quot;linux&quot;]
pub mod font;"><pre class="notranslate"><code class="notranslate">#[cfg(target_os="macos")]
#[path = "linux"]
pub mod font;
</code></pre></div>
<p dir="auto">This causes rustc to spin forever. Here's the interesting part of the stack trace:</p>
<p dir="auto"><a href="https://gist.github.com/metajack/5347891">https://gist.github.com/metajack/5347891</a></p>