title: How does for<> syntax differ from a regular lifetime bound?
body: <p>Consider the following code:</p>
  
  <pre><code>trait Trait&lt;T&gt; {}
  
  fn foo&lt;'a&gt;(_b: Box&lt;dyn Trait&lt;&amp;'a usize&gt;&gt;) {}
  fn bar(_b: Box&lt;dyn for&lt;'a&gt; Trait&lt;&amp;'a usize&gt;&gt;) {}
  </code></pre>
  
  <p>Both functions <code>foo</code> and <code>bar</code> seem to accept a <code>Box&lt;Trait&lt;&amp;'a usize&gt;&gt;</code>, although <code>foo</code> does it more concisely than <code>bar</code>.  What is the difference between them?</p>
  
  <p>Additionally, in what situations would I need <code>for&lt;&gt;</code> syntax like that above?  I know the Rust standard library uses it internally (often related to closures), but why might my code need it?</p>