diff --git a/fastrace-macro/src/lib.rs b/fastrace-macro/src/lib.rs index 219dc9e..ae32307 100644 --- a/fastrace-macro/src/lib.rs +++ b/fastrace-macro/src/lib.rs @@ -187,7 +187,8 @@ pub fn trace( .. } = sig; - quote::quote!( + let fn_span = ident.span(); + quote::quote_spanned!(fn_span=> #(#attrs) * #vis #constness #unsafety #asyncness #abi fn #ident<#gen_params>(#params) #return_type #where_clause