pyo3/tests/ui/invalid_need_module_arg_position.rs

12 lines
251 B
Rust
Raw Normal View History

use pyo3::prelude::*;
#[pymodule]
fn module(_py: Python, m: &PyModule) -> PyResult<()> {
2020-09-05 08:06:24 +00:00
#[pyfn(m, "with_module", pass_module)]
fn fail(string: &str, module: &PyModule) -> PyResult<&str> {
module.name()
}
Ok(())
}
fn main(){}