Browse Source

Mark functions as pub if trait is public (#574)

pull/579/head
Ben Brittain 5 years ago
committed by Alex Crichton
parent
commit
b0f558aa10
  1. 3
      crates/misc/rust/macro/src/lib.rs

3
crates/misc/rust/macro/src/lib.rs

@ -102,6 +102,7 @@ fn generate_methods(item: &syn::ItemTrait) -> syn::Result<TokenStream> {
}
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<TokenStream> {
result.extend(quote! {
#(#attrs)*
#sig {
#vis #sig {
let args = [
#(#args),*
];

Loading…
Cancel
Save