1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#[macro_use] extern crate procedurals; struct A {} struct B {} #[derive(IntoEnum)] enum E { A(A), B(B), } #[test] fn into_enum() { let a = A {}; let _e: E = a.into(); }