mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 17:28:00 +00:00
fix macro internal use with $crate (#2060)
This commit is contained in:
@@ -110,7 +110,7 @@ macro_rules! decl_module {
|
||||
$($t:tt)*
|
||||
}
|
||||
) => {
|
||||
decl_module!(@normalize
|
||||
$crate::decl_module!(@normalize
|
||||
$(#[$attr])*
|
||||
pub struct $mod_type<$trait_instance: $trait_name$(<I>, I: $instantiable $(= $module_default_instance)?)?>
|
||||
for enum $call_type where origin: $origin_type, system = system
|
||||
@@ -129,7 +129,7 @@ macro_rules! decl_module {
|
||||
$($t:tt)*
|
||||
}
|
||||
) => {
|
||||
decl_module!(@normalize
|
||||
$crate::decl_module!(@normalize
|
||||
$(#[$attr])*
|
||||
pub struct $mod_type<$trait_instance: $trait_name$(<I>, I: $instantiable $(= $module_default_instance)?)?>
|
||||
for enum $call_type where origin: $origin_type, system = $system
|
||||
@@ -155,7 +155,7 @@ macro_rules! decl_module {
|
||||
$vis:vis fn deposit_event $(<$dpeg:ident $(, $dpeg_instance:ident)?>)* () = default;
|
||||
$($rest:tt)*
|
||||
) => {
|
||||
decl_module!(@normalize
|
||||
$crate::decl_module!(@normalize
|
||||
$(#[$attr])*
|
||||
pub struct $mod_type<$trait_instance: $trait_name$(<I>, I: $instantiable $(= $module_default_instance)?)?>
|
||||
for enum $call_type where origin: $origin_type, system = $system
|
||||
@@ -182,7 +182,7 @@ macro_rules! decl_module {
|
||||
) { $( $impl:tt )* }
|
||||
$($rest:tt)*
|
||||
) => {
|
||||
decl_module!(@normalize
|
||||
$crate::decl_module!(@normalize
|
||||
$(#[$attr])*
|
||||
pub struct $mod_type<$trait_instance: $trait_name$(<I>, I: $instantiable $(= $module_default_instance)?)?>
|
||||
for enum $call_type where origin: $origin_type, system = $system
|
||||
@@ -207,7 +207,7 @@ macro_rules! decl_module {
|
||||
fn on_finalise($($param_name:ident : $param:ty),* ) { $( $impl:tt )* }
|
||||
$($rest:tt)*
|
||||
) => {
|
||||
decl_module!(@normalize
|
||||
$crate::decl_module!(@normalize
|
||||
$(#[$attr])*
|
||||
pub struct $mod_type<$trait_instance: $trait_name$(<I>, I: $instantiable $(= $module_default_instance)?)?>
|
||||
for enum $call_type where origin: $origin_type, system = $system
|
||||
@@ -232,7 +232,7 @@ macro_rules! decl_module {
|
||||
fn on_initialise($($param_name:ident : $param:ty),* ) { $( $impl:tt )* }
|
||||
$($rest:tt)*
|
||||
) => {
|
||||
decl_module!(@normalize
|
||||
$crate::decl_module!(@normalize
|
||||
$(#[$attr])*
|
||||
pub struct $mod_type<$trait_instance: $trait_name$(<I>, I: $instantiable $(= $module_default_instance)?)?>
|
||||
for enum $call_type where origin: $origin_type, system = $system
|
||||
@@ -284,7 +284,7 @@ macro_rules! decl_module {
|
||||
) $( -> $result:ty )* { $( $impl:tt )* }
|
||||
$($rest:tt)*
|
||||
) => {
|
||||
decl_module!(@normalize
|
||||
$crate::decl_module!(@normalize
|
||||
$(#[$attr])*
|
||||
pub struct $mod_type<$trait_instance: $trait_name$(<I>, $instance: $instantiable $(= $module_default_instance)?)?>
|
||||
for enum $call_type where origin: $origin_type, system = $system
|
||||
@@ -360,7 +360,7 @@ macro_rules! decl_module {
|
||||
) $( -> $result:ty )* { $( $impl:tt )* }
|
||||
$($rest:tt)*
|
||||
) => {
|
||||
decl_module!(@normalize
|
||||
$crate::decl_module!(@normalize
|
||||
$(#[$attr])*
|
||||
pub struct $mod_type<$trait_instance: $trait_name$(<I>, $instance: $instantiable $(= $module_default_instance)?)?>
|
||||
for enum $call_type where origin: $origin_type, system = $system
|
||||
@@ -389,7 +389,7 @@ macro_rules! decl_module {
|
||||
{ $( $offchain:tt )* }
|
||||
[ $($t:tt)* ]
|
||||
) => {
|
||||
decl_module!(@imp
|
||||
$crate::decl_module!(@imp
|
||||
$(#[$attr])*
|
||||
pub struct $mod_type<$trait_instance: $trait_name$(<I>, I: $instantiable $(= $module_default_instance)?)?>
|
||||
for enum $call_type where origin: $origin_type, system = $system {
|
||||
@@ -649,25 +649,25 @@ macro_rules! decl_module {
|
||||
#[cfg(not(feature = "std"))]
|
||||
pub struct $mod_type<$trait_instance: $trait_name $(<I>, $instance: $instantiable $( = $module_default_instance)?)?>(::core::marker::PhantomData<($trait_instance $(, $instance)?)>);
|
||||
|
||||
decl_module! {
|
||||
$crate::decl_module! {
|
||||
@impl_on_initialise
|
||||
$mod_type<$trait_instance: $trait_name $(<I>, $instance: $instantiable)?>;
|
||||
$( $on_initialise )*
|
||||
}
|
||||
|
||||
decl_module! {
|
||||
$crate::decl_module! {
|
||||
@impl_on_finalise
|
||||
$mod_type<$trait_instance: $trait_name $(<I>, $instance: $instantiable)?>;
|
||||
$( $on_finalise )*
|
||||
}
|
||||
|
||||
decl_module! {
|
||||
$crate::decl_module! {
|
||||
@impl_offchain
|
||||
$mod_type<$trait_instance: $trait_name $(<I>, $instance: $instantiable)?>;
|
||||
$( $offchain )*
|
||||
}
|
||||
|
||||
decl_module! {
|
||||
$crate::decl_module! {
|
||||
@impl_deposit_event
|
||||
$mod_type<$trait_instance: $trait_name $(<I>, $instance: $instantiable)?>;
|
||||
$system;
|
||||
@@ -679,7 +679,7 @@ macro_rules! decl_module {
|
||||
/// [`Call`]: enum.Call.html
|
||||
impl<$trait_instance: $trait_name $(<I>, $instance: $instantiable)?> $mod_type<$trait_instance $(, $instance)?> {
|
||||
$(
|
||||
decl_module! {
|
||||
$crate::decl_module! {
|
||||
@impl_function
|
||||
$mod_type<$trait_instance: $trait_name $(<I>, $fn_instance: $fn_instantiable)?>;
|
||||
$origin_type;
|
||||
|
||||
@@ -87,7 +87,7 @@ macro_rules! construct_runtime {
|
||||
$( $rest:tt )*
|
||||
}
|
||||
) => {
|
||||
construct_runtime!(
|
||||
$crate::construct_runtime!(
|
||||
{
|
||||
$runtime;
|
||||
$block;
|
||||
@@ -105,7 +105,7 @@ macro_rules! construct_runtime {
|
||||
$name:ident: $module:ident,
|
||||
$( $rest:tt )*
|
||||
) => {
|
||||
construct_runtime!(
|
||||
$crate::construct_runtime!(
|
||||
{ $( $preset )* };
|
||||
{ $( $expanded )* $name: $module::{Module, Call, Storage, Event<T>, Config<T>}, };
|
||||
$( $rest )*
|
||||
@@ -124,7 +124,7 @@ macro_rules! construct_runtime {
|
||||
},
|
||||
$( $rest:tt )*
|
||||
) => {
|
||||
construct_runtime!(
|
||||
$crate::construct_runtime!(
|
||||
{ $( $preset )* };
|
||||
{
|
||||
$( $expanded )*
|
||||
@@ -151,7 +151,7 @@ macro_rules! construct_runtime {
|
||||
},
|
||||
$( $rest:tt )*
|
||||
) => {
|
||||
construct_runtime!(
|
||||
$crate::construct_runtime!(
|
||||
{ $( $preset )* };
|
||||
{
|
||||
$( $expanded )*
|
||||
@@ -177,7 +177,7 @@ macro_rules! construct_runtime {
|
||||
},
|
||||
$( $rest:tt )*
|
||||
) => {
|
||||
construct_runtime!(
|
||||
$crate::construct_runtime!(
|
||||
{ $( $preset )* };
|
||||
{
|
||||
$( $expanded )*
|
||||
|
||||
Reference in New Issue
Block a user