2021-02-18 07:47:01 -06:00
|
|
|
error[E0308]: `match` arms have incompatible types
|
|
|
|
--> $DIR/issue-81839.rs:11:14
|
|
|
|
|
|
|
|
|
LL | / match num {
|
|
|
|
LL | | 1 => {
|
|
|
|
LL | | cx.answer_str("hi");
|
2023-01-08 14:24:17 -06:00
|
|
|
| | -------------------- this is found to be of type `()`
|
2021-02-18 07:47:01 -06:00
|
|
|
LL | | }
|
|
|
|
LL | | _ => cx.answer_str("hi"),
|
2023-02-10 12:03:54 -06:00
|
|
|
| | ^^^^^^^^^^^^^^^^^^^ expected `()`, found future
|
2021-02-18 07:47:01 -06:00
|
|
|
LL | | }
|
|
|
|
| |_____- `match` arms have incompatible types
|
2023-01-08 14:24:17 -06:00
|
|
|
|
|
|
|
|
help: consider removing this semicolon
|
|
|
|
|
|
|
|
|
LL - cx.answer_str("hi");
|
|
|
|
LL + cx.answer_str("hi")
|
|
|
|
|
|
|
|
|
help: consider using a semicolon here, but this will discard any values in the match arms
|
|
|
|
|
|
|
|
|
LL | };
|
|
|
|
| +
|
2021-02-18 07:47:01 -06:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2021-02-18 07:47:01 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|