Closed
Description
Given this example:
fn foo() -> Result<(), ()> {
bar()?
}
fn bar() -> Result<(), ()> {
}
fn main() { }
I get this error (playground):
error[E0308]: match arms have incompatible types
--> src/main.rs:2:4
|
2 | bar()?
| ^^^^^^
| |
| expected enum `std::result::Result`, found ()
| match arm with an incompatible type
|
= note: expected type `std::result::Result<(), ()>`
found type `()`
It seems like it should not be talking about match
=)