title: Mismatched types. Expected i32, found ()
body: <p>This code:</p>
  
  <pre><code>fn ackermann(m: i32, n: i32) -&gt; i32 {
      if m == 0 {
          return n + 1;
      } else if m &gt; 0 &amp;&amp; n == 0 {
          return ackermann(m - 1, 1);
      } else if m &gt; 0 &amp;&amp; n &gt; 0 {
          return ackermann(m - 1, ackermann(m, n - 1));
      }
  }
  </code></pre>
  
  <p>Has an error during compilation:</p>
  
  <pre class="lang-none prettyprint-override"><code>error: mismatched types [--explain E0308]
   --&gt; src/main.rs:3:5
    |&gt;
  3 |&gt;     if m == 0 {
    |&gt;     ^ expected i32, found ()
  note: expected type `i32`
  note:    found type `()`
  </code></pre>