title: Cannot use `?` operator for functions that return Result<(), error>
body: <p>Given this example:</p>
  
  <pre><code>fn function() -&gt; Result&lt;(), &amp;'static str&gt; {
      Ok(())
  }
  
  fn main() {
     function()?; // Compile error
  }
  </code></pre>
  
  <p>I get the error: <code>cannot use the ? operator in a function that returns ()</code>.</p>
  
  <p>Why can't I use the <code>?</code> operator for such functions? Is there syntactic sugar to avoid using a <code>match</code> statement?</p>