title: What are the differences between an impl trait argument and generic function parameter?
body: <p><a href="https://doc.rust-lang.org/edition-guide/rust-2018/trait-system/impl-trait-for-returning-complex-types-with-ease.html" rel="noreferrer"><code>impl Trait</code>s can be used as function arguments</a>. Are there differences between this and a generic function with a trait constraint?</p>
  
  <pre><code>trait Foo {}
  
  fn func1(_: impl Foo) {}
  
  fn func2&lt;T: Foo&gt;(_: T) {}
  </code></pre>