use shebling_codegen::struct_enum; // The attribute should handle generics just fine. struct Foo { foo: T, } #[struct_enum] enum Bar { Foo(Foo), } fn main() { let foo = Foo { foo: 17 }; let bar = Bar::from(foo); assert!(matches!(bar, Bar::Foo(_))); }