title: I can't have every trait and impl in the same file; how to place in seperate file?
body: <p>I have a struct, a trait, and impl in the top level file.</p>
  
  <pre><code>struct Model {}
  
  trait TsProperties {
      fn create_ar_x_matrix(&amp;self);
  }
  
  impl TsProperties for Model {
      fn create_ar_x_matrix(&amp;self){}
  }
  </code></pre>
  
  <p>I want to move the trait and impl to a separate file called <code>test.rs</code>.  In the main file I have:</p>
  
  <pre><code>mod test
  </code></pre>
  
  <p>In test I have:</p>
  
  <pre><code>use crate::Model;
  </code></pre>
  
  <p>When I instantiate the struct, Intellisense does not pick up <code>create_ar_x_matrix</code>. If the code is in <code>main.rs</code> it does.</p>
  
  <p>How do I resolve this?</p>
  
  <p>If I add <code>pub</code> I get this error:</p>
  
  <pre class="lang-none prettyprint-override"><code>25 | pub impl TsProperties for Model {                                                                                                                        
     | ^^^ `pub` not permitted here because it's implied 
  </code></pre>
  
  <p>if I use <code>pub</code> on the struct in main file and put the trait in a separate file:</p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0599]: no method named `create_ar_x_matrix` found for type `Model` in the current scope                                                                         
     --&gt; src/main.rs:353:12                                                                                                                                                   
      |                                                                                                                                                                       
  64  | pub struct Model {                                                                                                                                               
      | --------------------- method `create_ar_x_matrix` not found for this    
  </code></pre>