1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25use rustrover_proc_macro_bug::MyComponent; trait MyComponentTrait { fn foo(); } #[derive(MyComponent)] #[require(AnotherStruct(create_another))] struct MyStruct { _value: String, } struct AnotherStruct(u32); fn create_another() -> AnotherStruct { AnotherStruct(42) } fn main() { MyStruct::foo(); }