Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed May 8, 2021
1 parent f73eef9 commit 38326a5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tokio-macros/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ fn parse_knobs(
let body =
proc_macro2::TokenStream::from(TokenStream::from(input_tokens.into_iter().last().unwrap()));

input.block = syn::parse_quote! {
let body = quote! {
{
#rt
.enable_all()
Expand All @@ -335,9 +335,15 @@ fn parse_knobs(
}
};

let attrs = input.attrs;
let vis = input.vis;
let sig = input.sig;
let result = quote! {
#header
#input
#(#attrs)*
#vis
#sig
#body
};

Ok(result.into())
Expand Down

0 comments on commit 38326a5

Please sign in to comment.