title: use of undeclared type or module `HttpResponse`: not found in this scope
body: <p>I must admit, I am having a hard time making sense of the Rust compiler error messages.</p>
  <p>I have this module:</p>
  <p><strong>src/adapters.js</strong></p>
  <pre><code>use actix_web::{Responder, HttpResponse};
  
  pub mod Basic {
  
      pub fn api_index() -&gt; &amp;'static str {
          &quot;API&quot;
      }
  
      pub fn admin_index() -&gt; impl Responder {
          HttpResponse::Ok().body(&quot;hello world!&quot;)
      }
  
  }
  </code></pre>
  <p>The Rust compiler keeps telling me when I use</p>
  <pre><code>use crate::actix_web::{Responder, HttpResponse};
  </code></pre>
  <p>that:</p>
  <pre><code>E0432: unresolved import `crate::actix_web`  maybe a missing crate `actix_web`?
  </code></pre>
  <p>Rest assured, crate::actix_web is <em>not</em> missing, because I can run simple requests from main.rs. The problem starts when I want to use the actix_web modules within my own modules.</p>
  <p>If I have</p>
  <pre><code>use actix_web::{Responder, HttpResponse};
  </code></pre>
  <p>Rust keeps teeling me:</p>
  <pre><code>error[E0433]: failed to resolve: use of undeclared type or module `HttpResponse`
  
  HttpResponse::Ok().body(&quot;hello world!&quot;)
  ^^^^^^^^^^^^ not found in this scope
  
  
  
  help: consider importing one of these items
  use actix_web::HttpResponse;
  use crate::adapters::HttpResponse;
  
  
  E0432: unresolved import `crate::actix_web`  maybe a missing crate `actix_web`?
  </code></pre>
  <p>I my main.rs, as the first line, I've also declared:</p>
  <pre><code>extern crate actix_web;
  </code></pre>
  <p>For the sake of making sure, I've also added &quot;extern crate actix_web;&quot; to the adapters.rs module right at the start. That didn't change anything either.</p>
  <p>I am running out of options, I don't know what else I could possibly do.</p>