Deprecate Pallet decl_* Macros (#13705)

* Deprecate decl_ macros

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Allow deprecated in tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Revert "Allow deprecated in tests"

This reverts commit ce36080f9bb4079e9069af8ee02e0954753ae412.

* Deprecate all

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Push missing files

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* fmt

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Move decl_module to own file

Otherwise i have to spam allow(deprecated) for all recursive calls.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Revert "Move decl_module to own file"

This reverts commit 543a31185cda708d417127d6cb89cdc0c31d1f34.

* Fix tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2023-05-09 16:28:47 +02:00
committed by GitHub
parent da24214174
commit 55b18ea9a0
4 changed files with 9 additions and 0 deletions
+2
View File
@@ -67,6 +67,8 @@ pub use sp_runtime::traits::{BadOrigin, LookupError};
/// For instantiable modules you also need to give the instance generic type and bound to the
/// error declaration.
#[macro_export]
#[deprecated(note = "Will be removed soon; use the attribute `#[pallet]` macro instead.
For more info, see: <https://github.com/paritytech/substrate/pull/13705>")]
macro_rules! decl_error {
(
$(#[$attr:meta])*