Rename pallet trait Trait to Config (#7599)

* rename Trait to Config

* add test asserting using Trait is still valid.

* fix ui tests
This commit is contained in:
Guillaume Thiolliere
2020-11-30 15:34:54 +01:00
committed by GitHub
parent dd3c84c362
commit 1cbfc9257f
200 changed files with 1767 additions and 1607 deletions
@@ -33,11 +33,11 @@ pub struct GenesisConfigFieldDef {
pub struct GenesisConfigDef {
pub is_generic: bool,
pub fields: Vec<GenesisConfigFieldDef>,
/// For example: `<T: Trait<I>, I: Instance=DefaultInstance>`.
/// For example: `<T: Config<I>, I: Instance=DefaultInstance>`.
pub genesis_struct_decl: TokenStream,
/// For example: `<T, I>`.
pub genesis_struct: TokenStream,
/// For example: `<T: Trait<I>, I: Instance>`.
/// For example: `<T: Config<I>, I: Instance>`.
pub genesis_impl: TokenStream,
/// The where clause to use to constrain generics if genesis config is generic.
pub genesis_where_clause: Option<syn::WhereClause>,
@@ -42,7 +42,7 @@ pub struct DeclStorageDef {
module_name: syn::Ident,
/// Usually `T`.
module_runtime_generic: syn::Ident,
/// Usually `Trait`
/// Usually `Config`
module_runtime_trait: syn::Path,
/// For instantiable module: usually `I: Instance=DefaultInstance`.
module_instance: Option<ModuleInstanceDef>,
@@ -77,7 +77,7 @@ pub struct DeclStorageDefExt {
module_name: syn::Ident,
/// Usually `T`.
module_runtime_generic: syn::Ident,
/// Usually `Trait`.
/// Usually `Config`.
module_runtime_trait: syn::Path,
/// For instantiable module: usually `I: Instance=DefaultInstance`.
module_instance: Option<ModuleInstanceDef>,
@@ -93,7 +93,7 @@ pub struct DeclStorageDefExt {
crate_name: syn::Ident,
/// Full struct expansion: `Module<T, I>`.
module_struct: proc_macro2::TokenStream,
/// Impl block for module: `<T: Trait, I: Instance>`.
/// Impl block for module: `<T: Config, I: Instance>`.
module_impl: proc_macro2::TokenStream,
/// For instantiable: `I`.
optional_instance: Option<proc_macro2::TokenStream>,
@@ -212,7 +212,7 @@ pub struct StorageLineDefExt {
storage_struct: proc_macro2::TokenStream,
/// If storage is generic over runtime then `T`.
optional_storage_runtime_comma: Option<proc_macro2::TokenStream>,
/// If storage is generic over runtime then `T: Trait`.
/// If storage is generic over runtime then `T: Config`.
optional_storage_runtime_bound_comma: Option<proc_macro2::TokenStream>,
/// The where clause to use to constrain generics if storage is generic over runtime.
optional_storage_where_clause: Option<proc_macro2::TokenStream>,