Skip to content

Commit

Permalink
Deprecate decl_ macros
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
ggwpez committed Mar 24, 2023
1 parent 9058617 commit 1cb3433
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions frame/support/procedural/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ fn counter_prefix(prefix: &str) -> String {
/// }
/// ```
#[proc_macro]
#[deprecated(note = "This will be removed soon. Use the attribute `#[pallet]` macro instead.")]
pub fn decl_storage(input: TokenStream) -> TokenStream {
storage::decl_storage_impl(input)
}
Expand Down
1 change: 1 addition & 0 deletions frame/support/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2586,6 +2586,7 @@ macro_rules! decl_module {
// Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted.
#[derive(Clone, Copy, PartialEq, Eq, $crate::RuntimeDebug)]
$( #[$attr] )*
#[deprecated(note = "Will be removed soon; use the attribute `#[pallet]` macro instead.")]
pub struct $mod_type<
$trait_instance: $trait_name
$(<I>, $instance: $instantiable $( = $module_default_instance)?)?
Expand Down
1 change: 1 addition & 0 deletions frame/support/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ macro_rules! decl_error {
$crate::PalletError,
)]
#[scale_info(skip_type_params($generic $(, $inst_generic)?), capture_docs = "always")]
#[deprecated(note = "Will be removed soon; use the attribute `#[pallet]` macro instead.")]
pub enum $error<$generic: $trait $(, $inst_generic: $instance)?>
$( where $( $where_ty: $where_bound ),* )?
{
Expand Down
1 change: 1 addition & 0 deletions frame/support/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ macro_rules! decl_event {
/// Events for this module.
///
$(#[$attr])*
#[deprecated(note = "Will be removed soon; use the attribute `#[pallet]` macro instead.")]
pub enum Event {
$(
$events
Expand Down

0 comments on commit 1cb3433

Please sign in to comment.