From f63b19ae80a7bcf576fd035748e7be4e38def5c3 Mon Sep 17 00:00:00 2001 From: Bitdrifter Date: Mon, 6 Oct 2025 02:49:17 +0200 Subject: [PATCH] Don't reference std in generated code from #[instrument] --- tracing-attributes/src/expand.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracing-attributes/src/expand.rs b/tracing-attributes/src/expand.rs index eb3ea5cda..f6b014f86 100644 --- a/tracing-attributes/src/expand.rs +++ b/tracing-attributes/src/expand.rs @@ -745,7 +745,7 @@ impl<'block> AsyncInfo<'block> { let async_attrs = &async_expr.attrs; if pinned_box { quote! { - ::std::boxed::Box::pin(#(#async_attrs) * async move { #instrumented_block }) + ::alloc::boxed::Box::pin(#(#async_attrs) * async move { #instrumented_block }) } } else { quote! {