From bed3a3dc180f465bc4455d0569bf885c5d0069de Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 17 Mar 2022 18:50:46 +0300 Subject: [PATCH] codegen: Fix hygiene mismatch between function `args` uses and definitions --- codegen/src/function.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codegen/src/function.rs b/codegen/src/function.rs index 6cebaa03..9bd07eba 100644 --- a/codegen/src/function.rs +++ b/codegen/src/function.rs @@ -774,14 +774,14 @@ impl ExportedFn { syn::Type::Path(ref p) if p.path == string_type_path => { is_string = true; is_ref = false; - quote_spanned!(arg_type.span() => + quote_spanned!(arg_type.span().resolved_at(Span::call_site()) => mem::take(args[#i]).into_string().unwrap() ) } _ => { is_string = false; is_ref = false; - quote_spanned!(arg_type.span() => + quote_spanned!(arg_type.span().resolved_at(Span::call_site()) => mem::take(args[#i]).cast::<#arg_type>() ) }