title: How does the ? operator interact with the From trait?
body: <p>Say I have the following:</p>
  
  <pre class="lang-rust prettyprint-override"><code>use std::fs::File;
  
  impl From&lt;i32&gt; for Blah {
  
      fn from(b:i32) -&gt; Blah {
          Blah {}
      }
  }
  
  fn main() {}
  
  enum MyError {
      ParseError,
  }
  
  impl From&lt;std::io::Error&gt; for MyError {
      fn from(_:std::io::Error) -&gt; Self {
          MyError::ParseError
      }
  }
  
  fn get_result() -&gt; Result&lt;Blah, MyError&gt; {
      let mut file = File::create("foo.txt")?;
  }
  </code></pre>
  
  <p>This compiles fine. I don't understand how. </p>
  
  <p><code>File::create</code> throws an <code>std::io::error</code>, which we're trying to wrap in a <code>MyError</code>. But we never explicitly call <code>from</code> anywhere!? How does it compile?</p>
  
  <p>As the comments from this answer <a href="https://stackoverflow.com/questions/57853235/rust-understanding-from-trait">Rust understanding From trait</a> indicate, you do have to explicitly call <code>from</code>. </p>
  
  <p>So, how is the above snippet compiling?</p>