26 lines
972 B
Plaintext
26 lines
972 B
Plaintext
error: Python functions cannot have generic type parameters
|
|
--> tests/ui/invalid_pyfunctions.rs:4:21
|
|
|
|
|
4 | fn generic_function<T>(value: T) {}
|
|
| ^
|
|
|
|
error: Python functions cannot have `impl Trait` arguments
|
|
--> tests/ui/invalid_pyfunctions.rs:7:36
|
|
|
|
|
7 | fn impl_trait_function(impl_trait: impl AsRef<PyAny>) {}
|
|
| ^^^^
|
|
|
|
error: `async fn` is not yet supported for Python functions.
|
|
|
|
Additional crates such as `pyo3-asyncio` can be used to integrate async Rust and Python. For more information, see https://github.com/PyO3/pyo3/issues/1632
|
|
--> tests/ui/invalid_pyfunctions.rs:10:1
|
|
|
|
|
10 | async fn async_function() {}
|
|
| ^^^^^
|
|
|
|
error: Required positional parameters cannot come after optional parameters
|
|
--> tests/ui/invalid_pyfunctions.rs:13:57
|
|
|
|
|
13 | fn required_arg_after_optional(optional: Option<isize>, required: isize) {}
|
|
| ^^^^^^^^
|