title: fn foo() -> Result<()> throws "expected 2 type arguments"
body: <p>Why isn't <code>Result&lt;()&gt;</code> allowed when compiling this bit of Rust code? Is it a breaking change between Rust editions?</p>
  
  <pre><code>fn run() -&gt; Result&lt;()&gt; {
      let (tx, rx) = channel();
  
      thread::spawn(move || {
          do_things_with_tx(&amp;exit_tx);
      });
  
      match exit_rx.recv() {
          Ok(result) =&gt; if let Err(reason) = result {
              return Err(reason);
          },
          Err(e) =&gt; {
              return Err(e.into());
          },
      }
  
      Ok(())
  }
  </code></pre>
  
  <p>The compiler says:</p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0107]: wrong number of type arguments: expected 2, found 1
      --&gt; src/main.rs:1000:18
       |
  1000 | fn run_wifi() -&gt; Result&lt;()&gt; {
       |                  ^^^^^^^^^^ expected 2 type arguments
  </code></pre>
  
  <p>When I tweak the return type to <code>Result&lt;(), Err&gt;</code>, it says: </p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0107]: wrong number of type arguments: expected 2, found 0
      --&gt; src/main.rs:1000:29
       |
  1000 | fn run() -&gt; Result&lt;(), Err&gt; {
       |                        ^^^ expected 2 type arguments
  </code></pre>
  
  <p>This is from the <a href="https://github.com/balena-io/wifi-connect" rel="noreferrer">wifi-connect project</a>. </p>