From f9250fb0530b292c59492b6e6db7d7c4eef67c80 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Mon, 28 Mar 2022 23:22:17 +0800 Subject: [PATCH] Remove unnecessary call site resolution. --- codegen/src/function.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/codegen/src/function.rs b/codegen/src/function.rs index e276cfa8..3f593c7c 100644 --- a/codegen/src/function.rs +++ b/codegen/src/function.rs @@ -651,8 +651,7 @@ impl ExportedFn { let return_span = self .return_type() .map(|r| r.span()) - .unwrap_or_else(Span::call_site) - .resolved_at(Span::call_site()); + .unwrap_or_else(Span::call_site); if self.params.return_raw.is_some() { quote_spanned! { return_span => pub #dynamic_signature { @@ -835,8 +834,7 @@ impl ExportedFn { let return_span = self .return_type() .map(|r| r.span()) - .unwrap_or_else(Span::call_site) - .resolved_at(Span::call_site()); + .unwrap_or_else(Span::call_site); let return_expr = if self.params.return_raw.is_none() { quote_spanned! { return_span => Ok(Dynamic::from(#sig_name(#(#unpack_exprs),*)))