title: Add trait to extend builtin types
body: <p>I'm trying to extend the Iterator trait with a custom function:</p>
  <pre class="lang-rs prettyprint-override"><code>pub trait CustomTrait&lt;T&gt; : Iterator&lt;Item=T&gt; where Self: Sized, Self: 'static {
      #[inline]
      fn custom_function(self) -&gt; Result&lt;Box&lt;dyn Iterator&gt;, Err&gt; {
          let boxed = Box::new(self);
          do_something(boxed)
      }
  }
  </code></pre>
  <p>It's compiles correctly. However, when I go to call my new trait on a iterator, the compiler complains about it not being implemented for the iterator. (I have tried <code>std::ops::Range</code> and <code>std::slice::Iter&lt;'_, {integer}&gt;</code>.)</p>
  <p>I was able to get each function call working for individual struct types with lines such as below:</p>
  <pre class="lang-rs prettyprint-override"><code>impl CustomTrait&lt;u64&gt; for std::ops::Range&lt;u64&gt; {}
  </code></pre>
  <p>However, I assume there must be a way that I can get my trait definition to apply to all Iterables without having to manually implement it for each struct that implements the Iterable trait.</p>