pyo3/tests/ui/invalid_argument_attributes.rs
Daniil Konovalenko 554cffd60d
add #[pyo3(from_py_with="...")] attribute (#1411)
* allow from_py_with inside #[derive(FromPyObject)]
* split up FnSpec::parse
2021-02-21 00:15:20 +09:00

16 lines
360 B
Rust

use pyo3::prelude::*;
#[pyfunction]
fn invalid_attribute(#[pyo3(get)] param: String) {}
#[pyfunction]
fn from_py_with_no_value(#[pyo3(from_py_with)] param: String) {}
#[pyfunction]
fn from_py_with_string(#[pyo3("from_py_with")] param: String) {}
#[pyfunction]
fn from_py_with_value_not_a_string(#[pyo3(from_py_with = func)] param: String) {}
fn main() {}