Skip to content

Commit

Permalink
macros: fix diagnostics of last statement (#5762)
Browse files Browse the repository at this point in the history
  • Loading branch information
icedrocket authored Jun 4, 2023
1 parent e2853c1 commit 076d77c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tokio-macros/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,10 @@ fn parse_knobs(mut input: ItemFn, is_test: bool, config: FinalConfig) -> TokenSt
},
};
if let Some(v) = config.worker_threads {
rt = quote! { #rt.worker_threads(#v) };
rt = quote_spanned! {last_stmt_start_span=> #rt.worker_threads(#v) };
}
if let Some(v) = config.start_paused {
rt = quote! { #rt.start_paused(#v) };
rt = quote_spanned! {last_stmt_start_span=> #rt.start_paused(#v) };
}

let header = if is_test {
Expand Down

0 comments on commit 076d77c

Please sign in to comment.