title: Why am I getting "parameter is never used [E0392]"?
body: <p>I'm trying to implement an Octree in Rust. The Octree is generic over a type with a constraint that it should implement a generic trait:</p>
  
  <pre><code>pub trait Generable&lt;U&gt; {
      fn generate_children(&amp;self, data: &amp;U) -&gt; Vec&lt;Option&lt;Self&gt;&gt;;
  }
  
  pub enum Octree&lt;T, U&gt;
  where
      T: Generable&lt;U&gt;,
  {
      Node {
          data: T,
          children: Vec&lt;Box&lt;Octree&lt;T, U&gt;&gt;&gt;,
      },
      Empty,
      Uninitialized,
  }
  </code></pre>
  
  <p>Here is a <a href="https://play.rust-lang.org/?gist=1dc357caf8bd488da4ae9ed169324c30&amp;version=stable" rel="noreferrer">simplified example reproducing the issue on the Playground</a></p>
  
  <p>This generates an error: </p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0392]: parameter `U` is never used
   --&gt; src/main.rs:5:20
    |
  5 | pub enum Octree&lt;T, U&gt;
    |                    ^ unused type parameter
    |
    = help: consider removing `U` or using a marker such as `std::marker::PhantomData`
  </code></pre>
  
  <p>Removing the <code>U</code> from the signature results in "undeclared type name 'U'".</p>
  
  <p>Am I doing something wrong or is it a bug? How to do this properly?</p>