Implement #[pallet::composite_enum] (#13722)

* Implement #[pallet::hold_reason]

* Appease clippy

* cargo fmt

* Update test expectations

* Update test expectations

* Support composite_enum attribute instead

* Update test expectations

* Change hold_reason to composite_enum

* Add UI test for unsupported identifier when using composite_enum

* Fix comment

* Add documentation for pallet::composable_enum

* More docs

* cargo fmt
This commit is contained in:
Keith Yeung
2023-04-04 20:28:46 +08:00
committed by GitHub
parent c268f3d3c8
commit 1a55f961c6
26 changed files with 682 additions and 11 deletions
@@ -1,4 +1,4 @@
error: expected one of: `Pallet`, `Call`, `Storage`, `Event`, `Config`, `Origin`, `Inherent`, `ValidateUnsigned`
error: expected one of: `Pallet`, `Call`, `Storage`, `Event`, `Config`, `Origin`, `Inherent`, `ValidateUnsigned`, `FreezeReason`, `HoldReason`, `LockId`, `SlashReason`
--> $DIR/invalid_module_details_keyword.rs:9:20
|
9 | system: System::{enum},
@@ -1,4 +1,4 @@
error: expected one of: `Pallet`, `Call`, `Storage`, `Event`, `Config`, `Origin`, `Inherent`, `ValidateUnsigned`
error: expected one of: `Pallet`, `Call`, `Storage`, `Event`, `Config`, `Origin`, `Inherent`, `ValidateUnsigned`, `FreezeReason`, `HoldReason`, `LockId`, `SlashReason`
--> $DIR/invalid_module_entry.rs:10:23
|
10 | Balance: balances::{Error},