title: Access to external crates from module
body: <p>I added the dependency <code>rand</code> to my project:</p>
  
  <pre><code>[dependencies]
  rand = "0.5"
  </code></pre>
  
  <p>In my <code>main.rs</code>, I have the following:</p>
  
  <pre><code>extern crate rand;
  
  pub mod foo;
  use foo::Foo;
  
  fn main() {
      println!("{:#?}", Foo::new());
  }
  </code></pre>
  
  <p>And in the file <code>foo.rs</code>:</p>
  
  <pre><code>use rand::Rng;
  
  #[derive(Debug)]
  pub struct Foo { bar: bool }
  
  impl Foo {
      pub fn new() -&gt; Foo {
          Foo { bar: rand::thread_rng().gen_bool(0.5) }
      }
  }
  </code></pre>
  
  <p>And when I try to compile it, I have the following error:</p>
  
  <pre><code>error[E0658]: access to extern crates through prelude is experimental (see issue #44660)
    --&gt; src\foo.rs:11:18
     |
  11 |             bar: rand::thread_rng().gen_bool(0.5)
     |                  ^^^^
  </code></pre>
  
  <p>How can I use external crates from modules?</p>