mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Remove default expansion from construct_runtime! (#4937)
This removes the following syntactic sugar from `construct_runtime!`: - Expansion of `default` to the default set of module parts - Expansion of `System: system` to the default set of module parts The macro now requires the user to provide all the module parts of a pallet.
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
use frame_support::construct_runtime;
|
||||
|
||||
construct_runtime! {
|
||||
pub enum Runtime where
|
||||
Block = Block,
|
||||
NodeBlock = Block,
|
||||
UncheckedExtrinsic = UncheckedExtrinsic
|
||||
{
|
||||
System: system,
|
||||
Balance: balances::{default, Error},
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
error: Only the following modules are allowed: `Module`, `Call`, `Storage`, `Event`, `Config`, `Origin`, `Inherent`, `ValidateUnsigned`
|
||||
--> $DIR/default_module_invalid_arg.rs:10:32
|
||||
|
|
||||
10 | Balance: balances::{default, Error},
|
||||
| ^^^^^
|
||||
@@ -6,7 +6,7 @@ construct_runtime! {
|
||||
NodeBlock = Block,
|
||||
UncheckedExtrinsic = UncheckedExtrinsic
|
||||
{
|
||||
System: system,
|
||||
System: system::{Module},
|
||||
Balance: balances::{Config, Call, Config<T>, Origin<T>},
|
||||
}
|
||||
}
|
||||
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
use frame_support::construct_runtime;
|
||||
|
||||
construct_runtime! {
|
||||
pub enum Runtime where
|
||||
Block = Block,
|
||||
NodeBlock = Block,
|
||||
UncheckedExtrinsic = UncheckedExtrinsic
|
||||
{
|
||||
System: system,
|
||||
Balance: balances::{default, Config},
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
error: `Config` is already included in `default`. Either remove `default` or remove `Config`
|
||||
--> $DIR/double_module_parts_default.rs:10:32
|
||||
|
|
||||
10 | Balance: balances::{default, Config},
|
||||
| ^^^^^^
|
||||
+1
-1
@@ -6,7 +6,7 @@ construct_runtime! {
|
||||
NodeBlock = Block,
|
||||
UncheckedExtrinsic = UncheckedExtrinsic
|
||||
{
|
||||
System: system,
|
||||
System: system::{Module},
|
||||
Balance: balances::<Instance1>::{Call<T>, Origin<T>},
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
error: expected `default` or identifier
|
||||
error: expected one of: `Module`, `Call`, `Storage`, `Event`, `Config`, `Origin`, `Inherent`, `ValidateUnsigned`
|
||||
--> $DIR/invalid_module_details_keyword.rs:9:20
|
||||
|
|
||||
9 | system: System::{enum},
|
||||
|
||||
@@ -6,7 +6,7 @@ construct_runtime! {
|
||||
NodeBlock = Block,
|
||||
UncheckedExtrinsic = UncheckedExtrinsic
|
||||
{
|
||||
System: system,
|
||||
System: system::{Module},
|
||||
Balance: balances::{Error},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
error: Only the following modules are allowed: `Module`, `Call`, `Storage`, `Event`, `Config`, `Origin`, `Inherent`, `ValidateUnsigned`
|
||||
error: expected one of: `Module`, `Call`, `Storage`, `Event`, `Config`, `Origin`, `Inherent`, `ValidateUnsigned`
|
||||
--> $DIR/invalid_module_entry.rs:10:23
|
||||
|
|
||||
10 | Balance: balances::{Error},
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
error: expected `,`
|
||||
error: expected `::`
|
||||
--> $DIR/invalid_token_after_module.rs:9:18
|
||||
|
|
||||
9 | system: System ?
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ construct_runtime! {
|
||||
NodeBlock = Block,
|
||||
UncheckedExtrinsic = UncheckedExtrinsic
|
||||
{
|
||||
System: system,
|
||||
System: system::{Module},
|
||||
Balance: balances::<Instance1>::{Event},
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ construct_runtime! {
|
||||
NodeBlock = Block,
|
||||
UncheckedExtrinsic = UncheckedExtrinsic
|
||||
{
|
||||
System: system,
|
||||
System: system::{Module},
|
||||
Balance: balances::<Instance1>::{Origin},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ construct_runtime! {
|
||||
NodeBlock = Block,
|
||||
UncheckedExtrinsic = UncheckedExtrinsic
|
||||
{
|
||||
System: system,
|
||||
System: system::{Module},
|
||||
Balance: balances::<Instance1>::{Call(toto), Origin<I>},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user