title: Rust initialize generic type
body: <p>I've got a complex chunk of code that I've outlined below.  Basically I need to initialize a generic, its always a struct and that struct has Default implemented, but the compiler still complains:</p>
  
  <pre><code>fn create&lt;T: Default&gt;() -&gt; T
  {
      T { ..Default::default() }
  }
  
  fn main()
  {
      let mut x = create::&lt;Bob&gt;();
  }
  </code></pre>
  
  <p>Yields:</p>
  
  <pre><code>error[E0574]: expected struct, variant or union type, found type parameter `T`
    --&gt; macro.rs:71:5
     |
  71 |     T { ..Default::default() }
     |     ^ not a struct, variant or union type
  
  error: aborting due to previous error
  </code></pre>
  
  <p>Is there a way to tell rust that T is always a struct or something?</p>
  
  <p>Thanks,</p>