Skip to content

Commit 456550d

Browse files
authored
fix: attach function span to the generated block (#160)
1 parent d9263df commit 456550d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fastrace-macro/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ pub fn trace(
187187
..
188188
} = sig;
189189

190-
quote::quote!(
190+
let fn_span = ident.span();
191+
quote::quote_spanned!(fn_span=>
191192
#(#attrs) *
192193
#vis #constness #unsafety #asyncness #abi fn #ident<#gen_params>(#params) #return_type
193194
#where_clause

0 commit comments

Comments
 (0)