Adds instance support for composite enums (#1857)
Fixes https://github.com/paritytech/polkadot-sdk/issues/1839 Currently, `composite_enum`s do not support pallet instances. This PR allows the following: ```rust #[pallet::composite_enum] pub enum HoldReason<I: 'static = ()> { SomeHoldReason } ``` ### Todo - [x] UI Test
Showing
- substrate/frame/balances/src/lib.rs 2 additions, 2 deletionssubstrate/frame/balances/src/lib.rs
- substrate/frame/support/procedural/src/construct_runtime/expand/composite_helper.rs 70 additions, 0 deletions...ocedural/src/construct_runtime/expand/composite_helper.rs
- substrate/frame/support/procedural/src/construct_runtime/expand/freeze_reason.rs 18 additions, 22 deletions.../procedural/src/construct_runtime/expand/freeze_reason.rs
- substrate/frame/support/procedural/src/construct_runtime/expand/hold_reason.rs 18 additions, 22 deletions...rt/procedural/src/construct_runtime/expand/hold_reason.rs
- substrate/frame/support/procedural/src/construct_runtime/expand/lock_id.rs 18 additions, 22 deletions...upport/procedural/src/construct_runtime/expand/lock_id.rs
- substrate/frame/support/procedural/src/construct_runtime/expand/mod.rs 1 addition, 0 deletions...me/support/procedural/src/construct_runtime/expand/mod.rs
- substrate/frame/support/procedural/src/construct_runtime/expand/slash_reason.rs 18 additions, 22 deletions...t/procedural/src/construct_runtime/expand/slash_reason.rs
- substrate/frame/support/procedural/src/pallet/parse/composite.rs 23 additions, 1 deletion...te/frame/support/procedural/src/pallet/parse/composite.rs
- substrate/frame/support/src/lib.rs 15 additions, 2 deletionssubstrate/frame/support/src/lib.rs
- substrate/frame/support/test/tests/construct_runtime_ui.rs 1 addition, 0 deletionssubstrate/frame/support/test/tests/construct_runtime_ui.rs
- substrate/frame/support/test/tests/construct_runtime_ui/pass/composite_enum_instance.rs 80 additions, 0 deletions...ests/construct_runtime_ui/pass/composite_enum_instance.rs
Please register or sign in to comment