title: Why can't I create a trait object with let _: Arc<dyn Trait> = value.into()?
body: <pre><code>use std::sync::Arc;
  
  trait Trait {}
  struct TraitImpl {}
  impl Trait for TraitImpl {}
  
  fn main() {
      let value = TraitImpl {};
      let _: Arc&lt;dyn Trait&gt; = Arc::new(value);    // compiles
      let _: Arc&lt;dyn Trait&gt; = value.into();       // doesn't compile
  }
  </code></pre>
  <p>Result</p>
  <pre class="lang-none prettyprint-override"><code>error[E0277]: the trait bound `std::sync::Arc&lt;dyn Trait&gt;: std::convert::From&lt;TraitImpl&gt;` is not satisfied
    --&gt; src/main.rs:10:35
     |
  10 |     let _: Arc&lt;dyn Trait&gt; = value.into();       // doesn't compile
     |                                   ^^^^ the trait `std::convert::From&lt;TraitImpl&gt;` is not implemented for `std::sync::Arc&lt;dyn Trait&gt;`
     |
     = help: the following implementations were found:
               &lt;std::sync::Arc&lt;T&gt; as std::convert::From&lt;T&gt;&gt;
               &lt;std::sync::Arc&lt;T&gt; as std::convert::From&lt;std::boxed::Box&lt;T&gt;&gt;&gt;
               &lt;std::sync::Arc&lt;[T]&gt; as std::convert::From&lt;&amp;[T]&gt;&gt;
               &lt;std::sync::Arc&lt;[T]&gt; as std::convert::From&lt;std::vec::Vec&lt;T&gt;&gt;&gt;
             and 8 others
     = note: required because of the requirements on the impl of `std::convert::Into&lt;std::sync::Arc&lt;dyn Trait&gt;&gt;` for `TraitImpl`
  </code></pre>
  <p>(<a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=6bf94209b77122a0336e554ff30c7411" rel="nofollow noreferrer">Playground</a>)</p>
  <p>Why does <code>Arc::new(value)</code> compile but not <code>value.into()</code>? I don't understand why <a href="https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.new" rel="nofollow noreferrer"><code>Arc&lt;T&gt;::new()</code></a> is satisfied while <a href="https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#impl-From%3CT%3E" rel="nofollow noreferrer"><code>From&lt;T&gt;::from</code></a> isn't.</p>
  <pre><code>impl&lt;T&gt; Arc&lt;T&gt; {
      pub fn new(data: T) -&gt; Arc&lt;T&gt;
  }
  </code></pre>
  <pre><code>impl&lt;T&gt; From&lt;T&gt; for Arc&lt;T&gt; {
      fn from(t: T) -&gt; Arc&lt;T&gt;
  }
  </code></pre>