codegen: Make super types available for custom ty

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2024-05-02 12:34:58 +00:00
parent 21bbdc4855
commit df101a1ae9
+3 -1
View File
@@ -27,7 +27,7 @@ pub fn generate_custom_values(
}; };
let ty = ty.to_token_stream(type_gen.settings()); let ty = ty.to_token_stream(type_gen.settings());
quote! { quote! {
type #name = #ty; pub type #name = #ty;
} }
}); });
@@ -43,6 +43,8 @@ pub fn generate_custom_values(
} }
pub mod custom_types { pub mod custom_types {
pub use super::*;
#(#custom_types)* #(#custom_types)*
} }
} }