use macro_rules_attribute::derive;
use mini_macro_magic::export;
#[derive(export!)]
#[custom(export(pub(crate) the_struct$))]
pub struct TheStruct(pub i32);
mod other {
crate::the_struct!(mini_macro_magic::emit!());
}
mod other_other {
crate::the_struct!(mini_macro_magic::emit!());
pub mod inner {
crate::the_struct!(mini_macro_magic::emit!());
}
}
#[test]
fn all_the_structs_are_emitted() {
assert_eq!(TheStruct(42).0, 42);
assert_eq!(other::TheStruct(42).0, 42);
assert_eq!(other_other::TheStruct(42).0, 42);
assert_eq!(other_other::inner::TheStruct(42).0, 42);
}