title: How can I add extension methods to a trait with associated types lying in a different crate?
body: <p>I'm trying to add an extension method to a trait in a different crate.
  This trait has an associated type specified on it.</p>
  
  <pre><code>pub trait Test&lt;W&gt; {
      type Error;
  
      fn do_sth(&amp;mut self) -&gt; Result&lt;W, Self::Error&gt;;
  }
  </code></pre>
  
  <p>Why is it not possible to add a method that is using the associated type <code>Error</code>?</p>
  
  <pre><code>impl dyn Test&lt;u8&gt; {
      fn use_do_sth(&amp;mut self) -&gt; Result&lt;u8: Self::Error&gt; {
          self.do_sth()
      }
  }
  </code></pre>
  
  <p><a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=6d387172a01205a901efc7e88aeb135a" rel="nofollow noreferrer">playground</a></p>