]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-81839.stderr
Rollup merge of #106798 - scottmcm:signum-via-cmp, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / issue-81839.stderr
1 error[E0308]: `match` arms have incompatible types
2   --> $DIR/issue-81839.rs:11:14
3    |
4 LL | /     match num {
5 LL | |         1 => {
6 LL | |             cx.answer_str("hi");
7    | |             --------------------
8    | |             |                  |
9    | |             |                  help: consider removing this semicolon
10    | |             this is found to be of type `()`
11 LL | |         }
12 LL | |         _ => cx.answer_str("hi"),
13    | |              ^^^^^^^^^^^^^^^^^^^ expected `()`, found opaque type
14 LL | |     }
15    | |_____- `match` arms have incompatible types
16    |
17 note: while checking the return type of the `async fn`
18   --> $DIR/auxiliary/issue-81839.rs:6:49
19    |
20 LL |     pub async fn answer_str(&self, _s: &str) -> Test {
21    |                                                 ^^^^ checked the `Output` of this `async fn`, found opaque type
22    = note: expected unit type `()`
23             found opaque type `impl Future<Output = Test>`
24
25 error: aborting due to previous error
26
27 For more information about this error, try `rustc --explain E0308`.