title: Rust says import is not used and can't find imported statements at the same time
body: <p>I've got some structure I want to use Serde with. Like this one:</p>
  
  <pre><code>use serde::{Serialize, Deserialize};
  
  #[derive(Serialize)]
  struct GetLinkResponse {
      error: String,
      link: String,
  }
  </code></pre>
  
  <p>But compiler says that:</p>
  
  <ol>
  <li><code>Serialize</code> import is not used</li>
  <li><code>Serialize</code> can't be found</li>
  </ol>
  
  <pre class="lang-none prettyprint-override"><code>error: cannot find derive macro `Serialize` in this scope
   --&gt; src/structs.rs:3:10
    |
  3 | #[derive(Serialize)]
    |          ^^^^^^^^^
  
  warning: unused imports: `Deserialize`, `Serialize`
   --&gt; src/structs.rs:1:13
    |
  1 | use serde::{Serialize, Deserialize};
    |             ^^^^^^^^^  ^^^^^^^^^^^
    |
    = note: `#[warn(unused_imports)]` on by default
  </code></pre>
  
  <p>I guess I'm not understanding something about how <em>use</em> works. Can somebody explain me what is my mistake here?</p>