error: Python functions cannot have generic type parameters --> tests/ui/invalid_pyfunctions.rs:4:21 | 4 | fn generic_function(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) {} | ^^^^ 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: wildcard argument names are not supported --> tests/ui/invalid_pyfunctions.rs:13:22 | 13 | fn wildcard_argument(_: i32) {} | ^ error: destructuring in arguments is not supported --> tests/ui/invalid_pyfunctions.rs:16:26 | 16 | fn destructured_argument((a, b): (i32, i32)) {} | ^^^^^^ error: required arguments after an `Option<_>` argument are ambiguous = help: add a `#[pyo3(signature)]` annotation on this function to unambiguously specify the default values for all optional parameters --> tests/ui/invalid_pyfunctions.rs:19:63 | 19 | fn function_with_required_after_option(_opt: Option, _x: i32) {} | ^^^ error: expected `&PyModule` or `Py` as first argument with `pass_module` --> tests/ui/invalid_pyfunctions.rs:22:37 | 22 | fn pass_module_but_no_arguments<'py>() {} | ^^ error[E0277]: the trait bound `&str: From<&pyo3::prelude::PyModule>` is not satisfied --> tests/ui/invalid_pyfunctions.rs:25:43 | 25 | fn first_argument_not_module<'py>(string: &str, module: &'py PyModule) -> PyResult<&'py str> { | ^ the trait `From<&pyo3::prelude::PyModule>` is not implemented for `&str` | = help: the following other types implement trait `From`: > >> >> > > > = note: required for `&pyo3::prelude::PyModule` to implement `Into<&str>`