title: Why can't I import module from different file in same directory?
body: <p>My directory structure:</p>
  
  <pre><code>src
      main.rs
      image.rs
      decoders.rs
  
  </code></pre>
  
  <p>When I try to import my decoders module in image.rs I get this:</p>
  
  <pre><code>error[E0583]: File not found for module `decoders`
  </code></pre>
  
  <p>decoders.rs:</p>
  
  <pre><code>pub mod Decoders {}
  </code></pre>
  
  <p>image.rs:</p>
  
  <pre><code>mod decoders
  
  use decoders::Decoders
  
  pub mod Image {}
  </code></pre>
  
  <p>Note: I am using a module that wraps the entire file on purpose that's I can put attributes on entire files. This is why it's not a duplicate of <a href="https://stackoverflow.com/questions/26388861/how-to-include-module-from-another-file-from-the-same-project">How to include module from another file from the same project?</a></p>
  
  <p>The weird thing is, is that this syntax works perfectly fine when I try to import Image in main.rs:</p>
  
  <pre><code>mod image;
  
  use image::Image;
  </code></pre>