Skip to content

Commit 076d77c

Browse files
authored
macros: fix diagnostics of last statement (tokio-rs#5762)
1 parent e2853c1 commit 076d77c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tokio-macros/src/entry.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ fn parse_knobs(mut input: ItemFn, is_test: bool, config: FinalConfig) -> TokenSt
354354
},
355355
};
356356
if let Some(v) = config.worker_threads {
357-
rt = quote! { #rt.worker_threads(#v) };
357+
rt = quote_spanned! {last_stmt_start_span=> #rt.worker_threads(#v) };
358358
}
359359
if let Some(v) = config.start_paused {
360-
rt = quote! { #rt.start_paused(#v) };
360+
rt = quote_spanned! {last_stmt_start_span=> #rt.start_paused(#v) };
361361
}
362362

363363
let header = if is_test {

0 commit comments

Comments
 (0)