mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-03 13:27:23 +00:00
Remove generation of instance trait by decl_storage. (#6812)
* remove generation of instance trait, no breaking change * doc * doc * Update frame/support/src/traits.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/support/procedural/src/storage/instance_trait.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e4e0e79ad7
commit
8a37f60844
@@ -324,7 +324,16 @@ fn get_module_instance(
|
||||
instantiable: Option<syn::Ident>,
|
||||
default_instance: Option<syn::Ident>,
|
||||
) -> syn::Result<Option<super::ModuleInstanceDef>> {
|
||||
let right_syntax = "Should be $Instance: $Instantiable = $DefaultInstance";
|
||||
let right_syntax = "Should be $I: $Instance = $DefaultInstance";
|
||||
|
||||
if instantiable.as_ref().map_or(false, |i| i != "Instance") {
|
||||
let msg = format!(
|
||||
"Instance trait must be named `Instance`, other names are no longer supported, because \
|
||||
it is now defined at frame_support::traits::Instance. Expect `Instance` found `{}`",
|
||||
instantiable.as_ref().unwrap(),
|
||||
);
|
||||
return Err(syn::Error::new(instantiable.span(), msg));
|
||||
}
|
||||
|
||||
match (instance, instantiable, default_instance) {
|
||||
(Some(instance), Some(instantiable), default_instance) => {
|
||||
|
||||
Reference in New Issue
Block a user