mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 23:31:07 +00:00
improve error msg on wrong closure signature (#3467)
This commit is contained in:
@@ -35,7 +35,7 @@ use syn::{
|
||||
},
|
||||
parse_macro_input,
|
||||
};
|
||||
use quote::quote;
|
||||
use quote::{quote, quote_spanned};
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -417,7 +417,16 @@ fn decl_store_extra_genesis(
|
||||
}
|
||||
assimilate_require_generic |= ext::expr_contains_ident(&expr.content, traitinstance);
|
||||
let content = &expr.content;
|
||||
scall = quote!( ( #content ) );
|
||||
scall = quote_spanned! { expr.span() =>
|
||||
let scall: fn(
|
||||
&mut (
|
||||
#scrate::sr_primitives::StorageOverlay,
|
||||
#scrate::sr_primitives::ChildrenStorageOverlay
|
||||
),
|
||||
&Self
|
||||
) = #content;
|
||||
scall
|
||||
};
|
||||
has_scall = true;
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user