pyo3/tests/compile-fail/class-used-on-enum.rs
2017-06-18 23:41:20 +08:00

13 lines
229 B
Rust

#![feature(proc_macro)]
extern crate pyo3;
use pyo3::{py, PyResult, Python, PyModule};
#[py::class]
//~^ ERROR: custom attribute panicked
//~^^ HELP: #[class] can only be used with normal structs
enum MyClass {
A,
B,
}