Remove unnecessary call site resolution.

This commit is contained in:
Stephen Chung 2022-03-28 23:22:17 +08:00
parent 95753bb9c3
commit f9250fb053

View File

@ -651,8 +651,7 @@ impl ExportedFn {
let return_span = self let return_span = self
.return_type() .return_type()
.map(|r| r.span()) .map(|r| r.span())
.unwrap_or_else(Span::call_site) .unwrap_or_else(Span::call_site);
.resolved_at(Span::call_site());
if self.params.return_raw.is_some() { if self.params.return_raw.is_some() {
quote_spanned! { return_span => quote_spanned! { return_span =>
pub #dynamic_signature { pub #dynamic_signature {
@ -835,8 +834,7 @@ impl ExportedFn {
let return_span = self let return_span = self
.return_type() .return_type()
.map(|r| r.span()) .map(|r| r.span())
.unwrap_or_else(Span::call_site) .unwrap_or_else(Span::call_site);
.resolved_at(Span::call_site());
let return_expr = if self.params.return_raw.is_none() { let return_expr = if self.params.return_raw.is_none() {
quote_spanned! { return_span => quote_spanned! { return_span =>
Ok(Dynamic::from(#sig_name(#(#unpack_exprs),*))) Ok(Dynamic::from(#sig_name(#(#unpack_exprs),*)))