diff --git a/crates/misc/rust/macro/src/lib.rs b/crates/misc/rust/macro/src/lib.rs index 2ff5071d5e..e94deb6b0d 100644 --- a/crates/misc/rust/macro/src/lib.rs +++ b/crates/misc/rust/macro/src/lib.rs @@ -102,6 +102,7 @@ fn generate_methods(item: &syn::ItemTrait) -> syn::Result { } let mut result = TokenStream::new(); let root = root(); + let vis = &item.vis; for item in item.items.iter() { let method = match item { @@ -165,7 +166,7 @@ fn generate_methods(item: &syn::ItemTrait) -> syn::Result { result.extend(quote! { #(#attrs)* - #sig { + #vis #sig { let args = [ #(#args),* ];