pyo3/tests/ui/invalid_result_conversion.s...

15 lines
714 B
Plaintext
Raw Normal View History

2020-11-19 12:05:08 +00:00
error[E0277]: the trait bound `std::result::Result<(), MyError>: IntoPyCallbackOutput<_>` is not satisfied
--> $DIR/invalid_result_conversion.rs:22:1
|
22 | #[pyfunction]
2020-11-19 12:05:08 +00:00
| ^^^^^^^^^^^^^ the trait `IntoPyCallbackOutput<_>` is not implemented for `std::result::Result<(), MyError>`
|
2020-11-19 12:05:08 +00:00
::: $WORKSPACE/src/callback.rs
|
2020-11-19 12:05:08 +00:00
| T: IntoPyCallbackOutput<U>,
| ----------------------- required by this bound in `pyo3::callback::convert`
|
= help: the following implementations were found:
2020-11-19 12:05:08 +00:00
<std::result::Result<T, E> as IntoPyCallbackOutput<U>>
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)