2022-05-09 17:15:43 +00:00
|
|
|
error[E0599]: no method named `assert_into_py_result` found for enum `Result` in the current scope
|
|
|
|
--> tests/ui/invalid_result_conversion.rs:21:1
|
|
|
|
|
|
|
|
|
21 | #[pyfunction]
|
|
|
|
| ^^^^^^^^^^^^^ method not found in `Result<(), MyError>`
|
|
|
|
|
|
2022-08-12 06:26:29 +00:00
|
|
|
note: the method `assert_into_py_result` exists on the type `()`
|
|
|
|
--> src/impl_/ghost.rs
|
|
|
|
|
|
|
|
|
| fn assert_into_py_result(&mut self) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-05-09 17:15:43 +00:00
|
|
|
= note: this error originates in the attribute macro `pyfunction` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2022-08-12 06:26:29 +00:00
|
|
|
help: use the `?` operator to extract the `()` value, propagating a `Result::Err` value to the caller
|
|
|
|
|
|
|
|
|
21 | #[pyfunction]?
|
|
|
|
| +
|
2022-05-09 17:15:43 +00:00
|
|
|
|
2021-05-06 22:07:19 +00:00
|
|
|
error[E0277]: the trait bound `Result<(), MyError>: IntoPyCallbackOutput<_>` is not satisfied
|
2021-10-10 15:22:29 +00:00
|
|
|
--> tests/ui/invalid_result_conversion.rs:21:1
|
2020-08-29 07:25:20 +00:00
|
|
|
|
|
2021-06-24 14:18:48 +00:00
|
|
|
21 | #[pyfunction]
|
2021-05-06 22:07:19 +00:00
|
|
|
| ^^^^^^^^^^^^^ the trait `IntoPyCallbackOutput<_>` is not implemented for `Result<(), MyError>`
|
2020-08-29 07:25:20 +00:00
|
|
|
|
|
2022-07-02 15:08:01 +00:00
|
|
|
= help: the trait `IntoPyCallbackOutput<U>` is implemented for `Result<T, E>`
|
2021-10-22 03:26:25 +00:00
|
|
|
note: required by a bound in `pyo3::callback::convert`
|
2022-04-25 21:17:10 +00:00
|
|
|
--> src/callback.rs
|
2021-10-22 03:26:25 +00:00
|
|
|
|
|
2022-04-25 21:17:10 +00:00
|
|
|
| T: IntoPyCallbackOutput<U>,
|
2021-10-22 03:26:25 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `pyo3::callback::convert`
|
2021-07-30 22:30:56 +00:00
|
|
|
= note: this error originates in the attribute macro `pyfunction` (in Nightly builds, run with -Z macro-backtrace for more info)
|