pyo3/tests/compile-fail/modinit-used-in-non-fn.rs

10 lines
222 B
Rust
Raw Normal View History

2017-06-18 15:41:20 +00:00
#![feature(proc_macro)]
extern crate pyo3;
use pyo3::{py, PyResult, Python, PyModule};
#[py::modinit(rust2py)]
//~^ ERROR: custom attribute panicked
//~^^ HELP: #[modinit] can only be used with fn block
struct Rust2Py;