title: How to require a trait in another trait correctly?
body: <p>I tried to write two traits where one requires another to be implemented and got this error:</p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0277]: the trait bound `T: ValTrait` is not satisfied
    --&gt; src/main.rs:20:1
     |
  20 | / fn get&lt;T: ValRequireTrait + std::fmt::Debug&gt;(_t: T) {
  21 | |     println!("{:?}", T::VAL);
  22 | | }
     | |_^ the trait `ValTrait` is not implemented for `T`
     |
     = help: consider adding a `where T: ValTrait` bound
     = note: required by `ValRequireTrait`
  </code></pre>
  
  <p><a href="https://play.rust-lang.org/?gist=3eaf27b96d59eddfec085a90687053cb&amp;version=stable" rel="noreferrer">The code</a>:</p>
  
  <pre><code>trait ValTrait&lt;T = Self&gt; {
      const VAL: T;
  }
  
  trait ValRequireTrait&lt;T: ValTrait = Self&gt; {}
  
  #[derive(Debug, Copy, Clone)]
  struct A {
      field: u64,
  }
  
  impl ValTrait for A {
      const VAL: A = A {
          field: 0u64
      };
  }
  impl ValRequireTrait for A {}
  
  
  fn get&lt;T: ValRequireTrait + std::fmt::Debug&gt;(_t: T) {
      println!("{:?}", T::VAL);
  }
  
  fn main() {
      let a = A { field: 6u64 };
      get(a);
  }
  </code></pre>
  
  <p>How to do this correctly? If I do what the compiler says I will not need the <code>ValRequireTrait</code> because it will be useless. I wanted <code>ValRequireTrait</code> to be a mark that the structure implements enough methods as I need. </p>
  
  <p>In other words, I expect such a requirement be transitive so when in <code>get()</code> function I require one trait (<code>ValRequireTrait</code>), others (<code>ValTrait</code>) will be required automatically without any specification in the code as compiler wants.</p>