mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 02:17:58 +00:00
Make sure docs given to decl_module! are passed to the module struct (#4526)
This commit is contained in:
committed by
Gavin Wood
parent
a45aa6e1b6
commit
f02e6d680a
@@ -1075,7 +1075,6 @@ macro_rules! decl_module {
|
||||
|
||||
// Declare a `Call` variant parameter that should be encoded `compact`.
|
||||
(@create_call_enum
|
||||
$( #[$attr:meta] )*
|
||||
$call_type:ident;
|
||||
<$trait_instance:ident: $trait_name:ident$(<I>, $instance:ident: $instantiable:path $(= $module_default_instance:path)?)?>
|
||||
{ $( $other_where_bounds:tt )* }
|
||||
@@ -1089,7 +1088,6 @@ macro_rules! decl_module {
|
||||
) => {
|
||||
$crate::decl_module! {
|
||||
@create_call_enum
|
||||
$( #[$attr] )*
|
||||
$call_type;
|
||||
<$trait_instance: $trait_name $(<I>, $instance: $instantiable $(= $module_default_instance)? )?>
|
||||
{ $( $other_where_bounds )* }
|
||||
@@ -1107,7 +1105,6 @@ macro_rules! decl_module {
|
||||
|
||||
// Declare a `Call` variant parameter.
|
||||
(@create_call_enum
|
||||
$( #[$attr:meta] )*
|
||||
$call_type:ident;
|
||||
<$trait_instance:ident: $trait_name:ident$(<I>, $instance:ident: $instantiable:path $(= $module_default_instance:path)?)?>
|
||||
{ $( $other_where_bounds:tt )* }
|
||||
@@ -1120,7 +1117,6 @@ macro_rules! decl_module {
|
||||
) => {
|
||||
$crate::decl_module! {
|
||||
@create_call_enum
|
||||
$( #[$attr] )*
|
||||
$call_type;
|
||||
<$trait_instance: $trait_name $(<I>, $instance: $instantiable $(= $module_default_instance)? )?>
|
||||
{ $( $other_where_bounds )* }
|
||||
@@ -1136,7 +1132,6 @@ macro_rules! decl_module {
|
||||
};
|
||||
|
||||
(@create_call_enum
|
||||
$( #[$attr:meta] )*
|
||||
$call_type:ident;
|
||||
<$trait_instance:ident: $trait_name:ident$(<I>, $instance:ident: $instantiable:path $(= $module_default_instance:path)?)?>
|
||||
{ $( $other_where_bounds:tt )* }
|
||||
@@ -1151,7 +1146,6 @@ macro_rules! decl_module {
|
||||
) => {
|
||||
$crate::decl_module! {
|
||||
@create_call_enum
|
||||
$( #[$attr] )*
|
||||
$call_type;
|
||||
<$trait_instance: $trait_name $(<I>, $instance: $instantiable $(= $module_default_instance)? )?>
|
||||
{ $( $other_where_bounds )* }
|
||||
@@ -1172,15 +1166,16 @@ macro_rules! decl_module {
|
||||
};
|
||||
|
||||
(@create_call_enum
|
||||
$( #[$attr:meta] )*
|
||||
$call_type:ident;
|
||||
<$trait_instance:ident: $trait_name:ident$(<I>, $instance:ident: $instantiable:path $(= $module_default_instance:path)?)?>
|
||||
{ $( $other_where_bounds:tt )* }
|
||||
{ $( $generated_variants:tt )* }
|
||||
{}
|
||||
) => {
|
||||
/// Dispatchable calls.
|
||||
///
|
||||
/// Each variant of this enum maps to a dispatchable function from the associated module.
|
||||
#[derive($crate::codec::Encode, $crate::codec::Decode)]
|
||||
$( #[$attr] )*
|
||||
pub enum $call_type<$trait_instance: $trait_name$(<I>, $instance: $instantiable $( = $module_default_instance)?)?>
|
||||
where $( $other_where_bounds )*
|
||||
{
|
||||
@@ -1221,6 +1216,7 @@ macro_rules! decl_module {
|
||||
|
||||
// Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, $crate::RuntimeDebug)]
|
||||
$( #[$attr] )*
|
||||
pub struct $mod_type<
|
||||
$trait_instance: $trait_name
|
||||
$(<I>, $instance: $instantiable $( = $module_default_instance)?)?
|
||||
@@ -1286,7 +1282,6 @@ macro_rules! decl_module {
|
||||
|
||||
$crate::decl_module! {
|
||||
@create_call_enum
|
||||
$( #[$attr] )*
|
||||
$call_type;
|
||||
<$trait_instance: $trait_name $(<I>, $instance: $instantiable $(= $module_default_instance)? )?>
|
||||
{ $( $other_where_bounds )* }
|
||||
|
||||
Reference in New Issue
Block a user