diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 0c21fcc904fa1..3d160108f62bb 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -1740,7 +1740,7 @@ impl frame_benchmarking_pallet_pov::Config for Runtime { } construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = node_primitives::Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/bags-list/src/mock.rs b/frame/bags-list/src/mock.rs index 2ccc3c438af37..a48b66b200e8e 100644 --- a/frame/bags-list/src/mock.rs +++ b/frame/bags-list/src/mock.rs @@ -88,7 +88,7 @@ impl bags_list::Config for Runtime { type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, diff --git a/frame/election-provider-multi-phase/src/mock.rs b/frame/election-provider-multi-phase/src/mock.rs index a46aa861ecf86..8dee94bb39716 100644 --- a/frame/election-provider-multi-phase/src/mock.rs +++ b/frame/election-provider-multi-phase/src/mock.rs @@ -54,7 +54,7 @@ pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/election-provider-support/src/onchain.rs b/frame/election-provider-support/src/onchain.rs index 296ac976d59f3..a312562d4944c 100644 --- a/frame/election-provider-support/src/onchain.rs +++ b/frame/election-provider-support/src/onchain.rs @@ -197,7 +197,7 @@ mod tests { pub type Block = sp_runtime::generic::Block; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/executive/src/lib.rs b/frame/executive/src/lib.rs index 05f3ee4f53588..b3a04c4fe0596 100644 --- a/frame/executive/src/lib.rs +++ b/frame/executive/src/lib.rs @@ -838,7 +838,7 @@ mod tests { } frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = TestBlock, NodeBlock = TestBlock, UncheckedExtrinsic = TestUncheckedExtrinsic diff --git a/frame/fast-unstake/src/mock.rs b/frame/fast-unstake/src/mock.rs index b20ba43ab3758..c9a1d6d517308 100644 --- a/frame/fast-unstake/src/mock.rs +++ b/frame/fast-unstake/src/mock.rs @@ -193,10 +193,11 @@ impl fast_unstake::Config for Runtime { type Block = frame_system::mocking::MockBlock; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime + where Block = Block, NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic + UncheckedExtrinsic = UncheckedExtrinsic, { System: frame_system, Timestamp: pallet_timestamp, diff --git a/frame/im-online/src/mock.rs b/frame/im-online/src/mock.rs index 97b411e8719de..64e77b24b9b09 100644 --- a/frame/im-online/src/mock.rs +++ b/frame/im-online/src/mock.rs @@ -43,7 +43,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, diff --git a/frame/nomination-pools/benchmarking/src/mock.rs b/frame/nomination-pools/benchmarking/src/mock.rs index 4e188ea7ef189..f6b2022bce518 100644 --- a/frame/nomination-pools/benchmarking/src/mock.rs +++ b/frame/nomination-pools/benchmarking/src/mock.rs @@ -173,7 +173,7 @@ impl crate::Config for Runtime {} type Block = frame_system::mocking::MockBlock; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/nomination-pools/src/mock.rs b/frame/nomination-pools/src/mock.rs index 99d521df3241b..e8924c0b9c0fa 100644 --- a/frame/nomination-pools/src/mock.rs +++ b/frame/nomination-pools/src/mock.rs @@ -236,7 +236,7 @@ impl pools::Config for Runtime { type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, diff --git a/frame/nomination-pools/test-staking/src/mock.rs b/frame/nomination-pools/test-staking/src/mock.rs index 3d0ab2c6f35f3..85d0dd6c50677 100644 --- a/frame/nomination-pools/test-staking/src/mock.rs +++ b/frame/nomination-pools/test-staking/src/mock.rs @@ -186,7 +186,7 @@ type Block = frame_system::mocking::MockBlock; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/offences/src/mock.rs b/frame/offences/src/mock.rs index 5fc987ebdafca..d0fc7377acfd6 100644 --- a/frame/offences/src/mock.rs +++ b/frame/offences/src/mock.rs @@ -70,7 +70,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, diff --git a/frame/support/test/compile_pass/src/lib.rs b/frame/support/test/compile_pass/src/lib.rs index 1ff72bea5dd13..7e9fdaff27b03 100644 --- a/frame/support/test/compile_pass/src/lib.rs +++ b/frame/support/test/compile_pass/src/lib.rs @@ -85,10 +85,11 @@ pub type Block = generic::Block; pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; construct_runtime!( - pub enum Runtime where + pub struct Runtime + where Block = Block, NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic + UncheckedExtrinsic = UncheckedExtrinsic, { System: frame_system, } diff --git a/frame/support/test/tests/construct_runtime.rs b/frame/support/test/tests/construct_runtime.rs index 24f8a278b3539..d0b31d71a6fcb 100644 --- a/frame/support/test/tests/construct_runtime.rs +++ b/frame/support/test/tests/construct_runtime.rs @@ -16,7 +16,7 @@ // limitations under the License. //! General tests for construct_runtime macro, test for: -//! * error declareed with decl_error works +//! * error declared with decl_error works //! * integrity test is generated #![recursion_limit = "128"] @@ -254,7 +254,7 @@ impl system::Config for Runtime { } frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/construct_runtime_ui/abundant_where_param.rs b/frame/support/test/tests/construct_runtime_ui/abundant_where_param.rs index d5e9f225219de..ab55c22e9fbf1 100644 --- a/frame/support/test/tests/construct_runtime_ui/abundant_where_param.rs +++ b/frame/support/test/tests/construct_runtime_ui/abundant_where_param.rs @@ -1,7 +1,7 @@ use frame_support::construct_runtime; construct_runtime! { - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, Block = Block1, diff --git a/frame/support/test/tests/construct_runtime_ui/both_use_and_excluded_parts.rs b/frame/support/test/tests/construct_runtime_ui/both_use_and_excluded_parts.rs index 7a074db9986a2..ea468d6de13ee 100644 --- a/frame/support/test/tests/construct_runtime_ui/both_use_and_excluded_parts.rs +++ b/frame/support/test/tests/construct_runtime_ui/both_use_and_excluded_parts.rs @@ -20,7 +20,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic tests/construct_runtime_ui/missing_where_block.rs:4:19 + --> tests/construct_runtime_ui/missing_where_block.rs:4:21 | -4 | pub enum Runtime {} - | ^ +4 | pub struct Runtime {} + | ^ diff --git a/frame/support/test/tests/construct_runtime_ui/missing_where_param.rs b/frame/support/test/tests/construct_runtime_ui/missing_where_param.rs index 2e311c5ea01ae..4d2225a4afbc9 100644 --- a/frame/support/test/tests/construct_runtime_ui/missing_where_param.rs +++ b/frame/support/test/tests/construct_runtime_ui/missing_where_param.rs @@ -1,7 +1,7 @@ use frame_support::construct_runtime; construct_runtime! { - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, {} diff --git a/frame/support/test/tests/construct_runtime_ui/more_than_256_modules.rs b/frame/support/test/tests/construct_runtime_ui/more_than_256_modules.rs index 4c8331ae442c8..7dcbdb9aa4fba 100644 --- a/frame/support/test/tests/construct_runtime_ui/more_than_256_modules.rs +++ b/frame/support/test/tests/construct_runtime_ui/more_than_256_modules.rs @@ -1,7 +1,7 @@ use frame_support::construct_runtime; construct_runtime! { - pub enum Runtime where + pub struct Runtime where UncheckedExtrinsic = UncheckedExtrinsic, Block = Block, NodeBlock = Block, diff --git a/frame/support/test/tests/construct_runtime_ui/no_comma_after_where.rs b/frame/support/test/tests/construct_runtime_ui/no_comma_after_where.rs index 954fadefa1794..499f9a5cdcd54 100644 --- a/frame/support/test/tests/construct_runtime_ui/no_comma_after_where.rs +++ b/frame/support/test/tests/construct_runtime_ui/no_comma_after_where.rs @@ -1,7 +1,7 @@ use frame_support::construct_runtime; construct_runtime! { - pub enum Runtime where + pub struct Runtime where UncheckedExtrinsic = UncheckedExtrinsic Block = Block, NodeBlock = Block, diff --git a/frame/support/test/tests/construct_runtime_ui/no_std_genesis_config.rs b/frame/support/test/tests/construct_runtime_ui/no_std_genesis_config.rs index 2ca9676406579..9c9c49c4b2740 100644 --- a/frame/support/test/tests/construct_runtime_ui/no_std_genesis_config.rs +++ b/frame/support/test/tests/construct_runtime_ui/no_std_genesis_config.rs @@ -38,7 +38,7 @@ impl frame_system::Config for Runtime { } construct_runtime! { - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/construct_runtime_ui/no_std_genesis_config.stderr b/frame/support/test/tests/construct_runtime_ui/no_std_genesis_config.stderr index d35565fb933ac..2cf451aa65135 100644 --- a/frame/support/test/tests/construct_runtime_ui/no_std_genesis_config.stderr +++ b/frame/support/test/tests/construct_runtime_ui/no_std_genesis_config.stderr @@ -2,7 +2,7 @@ error: `Pallet` does not have the std feature enabled, this will cause the `test --> tests/construct_runtime_ui/no_std_genesis_config.rs:40:1 | 40 | / construct_runtime! { -41 | | pub enum Runtime where +41 | | pub struct Runtime where 42 | | Block = Block, 43 | | NodeBlock = Block, ... | @@ -16,7 +16,7 @@ error[E0412]: cannot find type `GenesisConfig` in crate `test_pallet` --> tests/construct_runtime_ui/no_std_genesis_config.rs:40:1 | 40 | / construct_runtime! { -41 | | pub enum Runtime where +41 | | pub struct Runtime where 42 | | Block = Block, 43 | | NodeBlock = Block, ... | @@ -34,7 +34,7 @@ error[E0283]: type annotations needed --> tests/construct_runtime_ui/no_std_genesis_config.rs:40:1 | 40 | / construct_runtime! { -41 | | pub enum Runtime where +41 | | pub struct Runtime where 42 | | Block = Block, 43 | | NodeBlock = Block, ... | diff --git a/frame/support/test/tests/construct_runtime_ui/old_unsupported_pallet_decl.rs b/frame/support/test/tests/construct_runtime_ui/old_unsupported_pallet_decl.rs index 5691549c20f34..477ca3cc088a2 100644 --- a/frame/support/test/tests/construct_runtime_ui/old_unsupported_pallet_decl.rs +++ b/frame/support/test/tests/construct_runtime_ui/old_unsupported_pallet_decl.rs @@ -13,7 +13,7 @@ mod pallet_old { } construct_runtime! { - pub enum Runtime where + pub struct Runtime where UncheckedExtrinsic = UncheckedExtrinsic, Block = Block, NodeBlock = Block, diff --git a/frame/support/test/tests/construct_runtime_ui/old_unsupported_pallet_decl.stderr b/frame/support/test/tests/construct_runtime_ui/old_unsupported_pallet_decl.stderr index f8ec07e00106f..6029e7e6f48bb 100644 --- a/frame/support/test/tests/construct_runtime_ui/old_unsupported_pallet_decl.stderr +++ b/frame/support/test/tests/construct_runtime_ui/old_unsupported_pallet_decl.stderr @@ -1,8 +1,8 @@ error[E0433]: failed to resolve: could not find `tt_default_parts` in `pallet_old` - --> $DIR/old_unsupported_pallet_decl.rs:15:1 + --> tests/construct_runtime_ui/old_unsupported_pallet_decl.rs:15:1 | 15 | / construct_runtime! { -16 | | pub enum Runtime where +16 | | pub struct Runtime where 17 | | UncheckedExtrinsic = UncheckedExtrinsic, 18 | | Block = Block, ... | @@ -13,7 +13,7 @@ error[E0433]: failed to resolve: could not find `tt_default_parts` in `pallet_ol = note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find macro `decl_storage` in this scope - --> $DIR/old_unsupported_pallet_decl.rs:6:2 + --> tests/construct_runtime_ui/old_unsupported_pallet_decl.rs:6:2 | 6 | decl_storage! { | ^^^^^^^^^^^^ @@ -22,7 +22,7 @@ error: cannot find macro `decl_storage` in this scope frame_support::decl_storage error: cannot find macro `decl_module` in this scope - --> $DIR/old_unsupported_pallet_decl.rs:10:2 + --> tests/construct_runtime_ui/old_unsupported_pallet_decl.rs:10:2 | 10 | decl_module! { | ^^^^^^^^^^^ diff --git a/frame/support/test/tests/construct_runtime_ui/pallet_error_too_large.rs b/frame/support/test/tests/construct_runtime_ui/pallet_error_too_large.rs index b7ccadb5e3e58..866c3f0de6c3c 100644 --- a/frame/support/test/tests/construct_runtime_ui/pallet_error_too_large.rs +++ b/frame/support/test/tests/construct_runtime_ui/pallet_error_too_large.rs @@ -72,7 +72,7 @@ impl frame_system::Config for Runtime { } construct_runtime! { - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/construct_runtime_ui/pallet_error_too_large.stderr b/frame/support/test/tests/construct_runtime_ui/pallet_error_too_large.stderr index 99a543eef7a8a..b9cec02a2b092 100644 --- a/frame/support/test/tests/construct_runtime_ui/pallet_error_too_large.stderr +++ b/frame/support/test/tests/construct_runtime_ui/pallet_error_too_large.stderr @@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed --> tests/construct_runtime_ui/pallet_error_too_large.rs:74:1 | 74 | / construct_runtime! { -75 | | pub enum Runtime where +75 | | pub struct Runtime where 76 | | Block = Block, 77 | | NodeBlock = Block, ... | diff --git a/frame/support/test/tests/construct_runtime_ui/undefined_call_part.rs b/frame/support/test/tests/construct_runtime_ui/undefined_call_part.rs index abe5c4cfeb343..0010f5277bb40 100644 --- a/frame/support/test/tests/construct_runtime_ui/undefined_call_part.rs +++ b/frame/support/test/tests/construct_runtime_ui/undefined_call_part.rs @@ -47,7 +47,7 @@ impl frame_system::Config for Runtime { } construct_runtime! { - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/construct_runtime_ui/undefined_call_part.stderr b/frame/support/test/tests/construct_runtime_ui/undefined_call_part.stderr index 6baf01e866f64..c2092edea05b5 100644 --- a/frame/support/test/tests/construct_runtime_ui/undefined_call_part.stderr +++ b/frame/support/test/tests/construct_runtime_ui/undefined_call_part.stderr @@ -5,7 +5,7 @@ error: `Pallet` does not have #[pallet::call] defined, perhaps you should remove | ^^^^^^^^^^^^^^^^^^^^^^^^ ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | diff --git a/frame/support/test/tests/construct_runtime_ui/undefined_event_part.rs b/frame/support/test/tests/construct_runtime_ui/undefined_event_part.rs index 9a6ac5c6251fb..35212df8f457c 100644 --- a/frame/support/test/tests/construct_runtime_ui/undefined_event_part.rs +++ b/frame/support/test/tests/construct_runtime_ui/undefined_event_part.rs @@ -47,7 +47,7 @@ impl frame_system::Config for Runtime { } construct_runtime! { - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/construct_runtime_ui/undefined_event_part.stderr b/frame/support/test/tests/construct_runtime_ui/undefined_event_part.stderr index ff8ecf3041bf6..1ca64f381b005 100644 --- a/frame/support/test/tests/construct_runtime_ui/undefined_event_part.stderr +++ b/frame/support/test/tests/construct_runtime_ui/undefined_event_part.stderr @@ -5,7 +5,7 @@ error: `Pallet` does not have #[pallet::event] defined, perhaps you should remov | ^^^^^^^^^^^^^^^^^^^^^^^^ ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -19,7 +19,7 @@ error[E0412]: cannot find type `Event` in module `pallet` --> tests/construct_runtime_ui/undefined_event_part.rs:49:1 | 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | diff --git a/frame/support/test/tests/construct_runtime_ui/undefined_genesis_config_part.rs b/frame/support/test/tests/construct_runtime_ui/undefined_genesis_config_part.rs index 4facf85e280c0..ec753e9a03129 100644 --- a/frame/support/test/tests/construct_runtime_ui/undefined_genesis_config_part.rs +++ b/frame/support/test/tests/construct_runtime_ui/undefined_genesis_config_part.rs @@ -47,7 +47,7 @@ impl frame_system::Config for Runtime { } construct_runtime! { - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/construct_runtime_ui/undefined_genesis_config_part.stderr b/frame/support/test/tests/construct_runtime_ui/undefined_genesis_config_part.stderr index 046369e1112b0..72099c1b94c0d 100644 --- a/frame/support/test/tests/construct_runtime_ui/undefined_genesis_config_part.stderr +++ b/frame/support/test/tests/construct_runtime_ui/undefined_genesis_config_part.stderr @@ -5,7 +5,7 @@ error: `Pallet` does not have #[pallet::genesis_config] defined, perhaps you sho | ^^^^^^^^^^^^^^^^^^^^^^^^ ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -19,7 +19,7 @@ error[E0412]: cannot find type `GenesisConfig` in module `pallet` --> tests/construct_runtime_ui/undefined_genesis_config_part.rs:49:1 | 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -37,7 +37,7 @@ error[E0283]: type annotations needed --> tests/construct_runtime_ui/undefined_genesis_config_part.rs:49:1 | 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | diff --git a/frame/support/test/tests/construct_runtime_ui/undefined_inherent_part.rs b/frame/support/test/tests/construct_runtime_ui/undefined_inherent_part.rs index 322fa2c297285..22eaccca42d97 100644 --- a/frame/support/test/tests/construct_runtime_ui/undefined_inherent_part.rs +++ b/frame/support/test/tests/construct_runtime_ui/undefined_inherent_part.rs @@ -47,7 +47,7 @@ impl frame_system::Config for Runtime { } construct_runtime! { - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/construct_runtime_ui/undefined_inherent_part.stderr b/frame/support/test/tests/construct_runtime_ui/undefined_inherent_part.stderr index 74af0c264cd5e..dab6514261420 100644 --- a/frame/support/test/tests/construct_runtime_ui/undefined_inherent_part.stderr +++ b/frame/support/test/tests/construct_runtime_ui/undefined_inherent_part.stderr @@ -5,7 +5,7 @@ error: `Pallet` does not have #[pallet::inherent] defined, perhaps you should re | ^^^^^^^^^^^^^^^^^^^^^^^^ ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -22,7 +22,7 @@ error[E0599]: no function or associated item named `create_inherent` found for s | -------------------- function or associated item `create_inherent` not found for this struct ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -42,7 +42,7 @@ error[E0599]: no function or associated item named `is_inherent` found for struc | -------------------- function or associated item `is_inherent` not found for this struct ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -62,7 +62,7 @@ error[E0599]: no function or associated item named `check_inherent` found for st | -------------------- function or associated item `check_inherent` not found for this struct ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -82,7 +82,7 @@ error[E0599]: no associated item named `INHERENT_IDENTIFIER` found for struct `p | -------------------- associated item `INHERENT_IDENTIFIER` not found for this struct ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -102,7 +102,7 @@ error[E0599]: no function or associated item named `is_inherent_required` found | -------------------- function or associated item `is_inherent_required` not found for this struct ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | diff --git a/frame/support/test/tests/construct_runtime_ui/undefined_origin_part.rs b/frame/support/test/tests/construct_runtime_ui/undefined_origin_part.rs index 55cd5b545d6ba..1705fff49dda8 100644 --- a/frame/support/test/tests/construct_runtime_ui/undefined_origin_part.rs +++ b/frame/support/test/tests/construct_runtime_ui/undefined_origin_part.rs @@ -47,7 +47,7 @@ impl frame_system::Config for Runtime { } construct_runtime! { - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/construct_runtime_ui/undefined_origin_part.stderr b/frame/support/test/tests/construct_runtime_ui/undefined_origin_part.stderr index 4907053b12877..dd1bdf76106e6 100644 --- a/frame/support/test/tests/construct_runtime_ui/undefined_origin_part.stderr +++ b/frame/support/test/tests/construct_runtime_ui/undefined_origin_part.stderr @@ -5,7 +5,7 @@ error: `Pallet` does not have #[pallet::origin] defined, perhaps you should remo | ^^^^^^^^^^^^^^^^^^^^^^^^ ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -19,7 +19,7 @@ error[E0412]: cannot find type `Origin` in module `pallet` --> tests/construct_runtime_ui/undefined_origin_part.rs:49:1 | 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -37,7 +37,7 @@ error[E0282]: type annotations needed --> tests/construct_runtime_ui/undefined_origin_part.rs:49:1 | 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | diff --git a/frame/support/test/tests/construct_runtime_ui/undefined_validate_unsigned_part.rs b/frame/support/test/tests/construct_runtime_ui/undefined_validate_unsigned_part.rs index 0cf305a7dc055..8f64d30940725 100644 --- a/frame/support/test/tests/construct_runtime_ui/undefined_validate_unsigned_part.rs +++ b/frame/support/test/tests/construct_runtime_ui/undefined_validate_unsigned_part.rs @@ -47,7 +47,7 @@ impl frame_system::Config for Runtime { } construct_runtime! { - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/construct_runtime_ui/undefined_validate_unsigned_part.stderr b/frame/support/test/tests/construct_runtime_ui/undefined_validate_unsigned_part.stderr index 6f0b13c58933e..14106ddd09c17 100644 --- a/frame/support/test/tests/construct_runtime_ui/undefined_validate_unsigned_part.stderr +++ b/frame/support/test/tests/construct_runtime_ui/undefined_validate_unsigned_part.stderr @@ -5,7 +5,7 @@ error: `Pallet` does not have #[pallet::validate_unsigned] defined, perhaps you | ^^^^^^^^^^^^^^^^^^^^^^^^ ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -19,7 +19,7 @@ error[E0599]: no variant or associated item named `Pallet` found for enum `Runti --> tests/construct_runtime_ui/undefined_validate_unsigned_part.rs:56:3 | 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -36,7 +36,7 @@ error[E0599]: no function or associated item named `pre_dispatch` found for stru | -------------------- function or associated item `pre_dispatch` not found for this struct ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | @@ -57,7 +57,7 @@ error[E0599]: no function or associated item named `validate_unsigned` found for | -------------------- function or associated item `validate_unsigned` not found for this struct ... 49 | / construct_runtime! { -50 | | pub enum Runtime where +50 | | pub struct Runtime where 51 | | Block = Block, 52 | | NodeBlock = Block, ... | diff --git a/frame/support/test/tests/construct_runtime_ui/unsupported_meta_structure.rs b/frame/support/test/tests/construct_runtime_ui/unsupported_meta_structure.rs index b93adf9a780a7..e5fd284dc8722 100644 --- a/frame/support/test/tests/construct_runtime_ui/unsupported_meta_structure.rs +++ b/frame/support/test/tests/construct_runtime_ui/unsupported_meta_structure.rs @@ -1,7 +1,7 @@ use frame_support::construct_runtime; construct_runtime! { - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/construct_runtime_ui/unsupported_pallet_attr.rs b/frame/support/test/tests/construct_runtime_ui/unsupported_pallet_attr.rs index 3ec8b9db1d435..03363d30a6429 100644 --- a/frame/support/test/tests/construct_runtime_ui/unsupported_pallet_attr.rs +++ b/frame/support/test/tests/construct_runtime_ui/unsupported_pallet_attr.rs @@ -1,7 +1,7 @@ use frame_support::construct_runtime; construct_runtime! { - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/construct_runtime_ui/use_undefined_part.rs b/frame/support/test/tests/construct_runtime_ui/use_undefined_part.rs index c74e29bc05469..971e2b831ae08 100644 --- a/frame/support/test/tests/construct_runtime_ui/use_undefined_part.rs +++ b/frame/support/test/tests/construct_runtime_ui/use_undefined_part.rs @@ -25,7 +25,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/pallet_compatibility.rs b/frame/support/test/tests/pallet_compatibility.rs index bd11d0da3ca65..077b3c96e992c 100644 --- a/frame/support/test/tests/pallet_compatibility.rs +++ b/frame/support/test/tests/pallet_compatibility.rs @@ -267,7 +267,7 @@ pub type Block = sp_runtime::generic::Block; pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/pallet_compatibility_instance.rs b/frame/support/test/tests/pallet_compatibility_instance.rs index 1d2705b12ff31..c641556beda20 100644 --- a/frame/support/test/tests/pallet_compatibility_instance.rs +++ b/frame/support/test/tests/pallet_compatibility_instance.rs @@ -268,7 +268,7 @@ pub type Block = sp_runtime::generic::Block; pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/pallet_instance.rs b/frame/support/test/tests/pallet_instance.rs index 6dc73a6d4230f..5beb1480a4e82 100644 --- a/frame/support/test/tests/pallet_instance.rs +++ b/frame/support/test/tests/pallet_instance.rs @@ -334,7 +334,7 @@ pub type Block = sp_runtime::generic::Block; pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/support/test/tests/pallet_with_name_trait_is_valid.rs b/frame/support/test/tests/pallet_with_name_trait_is_valid.rs index 43330dbe25b41..8cd3c79cc6c08 100644 --- a/frame/support/test/tests/pallet_with_name_trait_is_valid.rs +++ b/frame/support/test/tests/pallet_with_name_trait_is_valid.rs @@ -114,7 +114,7 @@ mod tests { >; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = TestBlock, NodeBlock = TestBlock, UncheckedExtrinsic = TestUncheckedExtrinsic diff --git a/frame/support/test/tests/storage_layers.rs b/frame/support/test/tests/storage_layers.rs index c5bbbae02e111..f124aed9aa561 100644 --- a/frame/support/test/tests/storage_layers.rs +++ b/frame/support/test/tests/storage_layers.rs @@ -114,7 +114,7 @@ impl pallet::Config for Runtime {} impl decl_pallet::Config for Runtime {} frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic diff --git a/frame/system/benches/bench.rs b/frame/system/benches/bench.rs index 51652727c4766..d2b579814f8a9 100644 --- a/frame/system/benches/bench.rs +++ b/frame/system/benches/bench.rs @@ -48,7 +48,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, diff --git a/frame/transaction-payment/asset-tx-payment/src/mock.rs b/frame/transaction-payment/asset-tx-payment/src/mock.rs index bc994b4dce2cb..cd5147c3acd13 100644 --- a/frame/transaction-payment/asset-tx-payment/src/mock.rs +++ b/frame/transaction-payment/asset-tx-payment/src/mock.rs @@ -40,7 +40,8 @@ type Balance = u64; type AccountId = u64; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime + where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, diff --git a/frame/transaction-payment/src/mock.rs b/frame/transaction-payment/src/mock.rs index 92799bf5b0237..bfb9a194f8cb2 100644 --- a/frame/transaction-payment/src/mock.rs +++ b/frame/transaction-payment/src/mock.rs @@ -37,7 +37,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Runtime where + pub struct Runtime where Block = Block, NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic,