From 505869976591eba85bc7ad5f11db2413e9f8df53 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 28 Feb 2023 16:51:20 +0100 Subject: [PATCH] Give inline accumulator type the same visibility as the target --- instant-xml-macros/src/de.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instant-xml-macros/src/de.rs b/instant-xml-macros/src/de.rs index 37ebfd2..5a4a93f 100644 --- a/instant-xml-macros/src/de.rs +++ b/instant-xml-macros/src/de.rs @@ -479,6 +479,7 @@ fn deserialize_inline_struct( let (xml_impl_generics, xml_ty_generics, _) = generics.split_for_impl(); let (_, ty_generics, where_clause) = input.generics.split_for_impl(); + let visibility = &input.vis; quote!( impl #xml_impl_generics FromXml<'xml> for #ident #ty_generics #where_clause { @@ -504,7 +505,7 @@ fn deserialize_inline_struct( const KIND: ::instant_xml::Kind = ::instant_xml::Kind::Element; } - struct #accumulator #xml_ty_generics #where_clause { + #visibility struct #accumulator #xml_ty_generics #where_clause { #acc_field_defs }