Revision control

Copy as Markdown

error[E0308]: mismatched types
--> returns_result_but_incorrect_error.rs:50:2
|
50 | #[handle_error(Error)]
| ^^^^^^^^^^^^^^^^^^^^^^ expected `Result<String, ExternalError>`, found `Result<_, OtherExternalError>`
51 | fn func() -> Result<String, ExternalError> {
| ----------------------------- expected `std::result::Result<String, ExternalError>` because of return type
|
= note: expected enum `std::result::Result<String, ExternalError>`
found enum `std::result::Result<_, OtherExternalError>`
= note: this error originates in the attribute macro `handle_error` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use the `?` operator to extract the `std::result::Result<_, OtherExternalError>` value, propagating a `Result::Err` value to the caller
|
50 | #[handle_error(Error)]?
| +