use code_product::{product, product_items}; #[test] #[allow(dead_code)] const fn smoke() { product! { struct Foo(); struct Bar{} } product_items! { struct Baz(); struct Barf{} } } #[test] const fn product_expansion() { product! { $(T: (i32)) struct $((Foo)(Bar)) ($T); } let _ = Foo(1); let _ = Bar(2); } #[test] const fn product_items_expansion() { product_items! { $(T: (i32)) struct $((Foo)(Bar)) ($T); $(T: (&'static str)) struct $((Baz)(Barf)) ($T); } let _ = Foo(1); let _ = Bar(2); let _ = Baz("baz"); let _ = Barf("barf"); }