diff --git a/substrate/frame/support/procedural/src/construct_runtime/expand/call.rs b/substrate/frame/support/procedural/src/construct_runtime/expand/call.rs index 5ec665682d..cc4841418b 100644 --- a/substrate/frame/support/procedural/src/construct_runtime/expand/call.rs +++ b/substrate/frame/support/procedural/src/construct_runtime/expand/call.rs @@ -123,9 +123,7 @@ pub fn expand_outer_dispatch( } } } - // Deprecated, but will warn when used - #[allow(deprecated)] - impl #scrate::weights::GetDispatchInfo for RuntimeCall {} + impl #scrate::dispatch::GetCallMetadata for RuntimeCall { fn get_call_metadata(&self) -> #scrate::dispatch::CallMetadata { use #scrate::dispatch::GetCallName; diff --git a/substrate/frame/support/procedural/src/pallet/expand/call.rs b/substrate/frame/support/procedural/src/pallet/expand/call.rs index 031fa02bb9..aa6a8e09f5 100644 --- a/substrate/frame/support/procedural/src/pallet/expand/call.rs +++ b/substrate/frame/support/procedural/src/pallet/expand/call.rs @@ -351,10 +351,6 @@ pub fn expand_call(def: &mut Def) -> proc_macro2::TokenStream { } } - // Deprecated, but will warn when used - #[allow(deprecated)] - impl<#type_impl_gen> #frame_support::weights::GetDispatchInfo for #call_ident<#type_use_gen> #where_clause {} - impl<#type_impl_gen> #frame_support::dispatch::GetCallName for #call_ident<#type_use_gen> #where_clause { diff --git a/substrate/frame/support/src/weights.rs b/substrate/frame/support/src/weights.rs index 75eba8fbe9..7941f2a89a 100644 --- a/substrate/frame/support/src/weights.rs +++ b/substrate/frame/support/src/weights.rs @@ -22,7 +22,6 @@ mod extrinsic_weights; mod paritydb_weights; mod rocksdb_weights; -use crate::dispatch; pub use sp_weights::*; /// These constants are specific to FRAME, and the current implementation of its various components. @@ -38,70 +37,3 @@ pub mod constants { paritydb_weights::constants::ParityDbWeight, rocksdb_weights::constants::RocksDbWeight, }; } - -#[deprecated = "Function has moved to `frame_support::dispatch`"] -pub fn extract_actual_pays_fee( - res: &dispatch::DispatchResultWithPostInfo, - info: &dispatch::DispatchInfo, -) -> dispatch::Pays { - dispatch::extract_actual_pays_fee(res, info) -} -#[deprecated = "Function has moved to `frame_support::dispatch`"] -pub fn extract_actual_weight( - res: &dispatch::DispatchResultWithPostInfo, - info: &dispatch::DispatchInfo, -) -> Weight { - dispatch::extract_actual_weight(res, info) -} -#[deprecated = "Trait has moved to `frame_support::dispatch`"] -pub trait ClassifyDispatch: dispatch::ClassifyDispatch { - fn classify_dispatch(&self, target: T) -> dispatch::DispatchClass { - >::classify_dispatch(self, target) - } -} -#[deprecated = "Enum has moved to `frame_support::dispatch`"] -pub type DispatchClass = dispatch::DispatchClass; -#[deprecated = "Struct has moved to `frame_support::dispatch`"] -pub type DispatchInfo = dispatch::DispatchInfo; -#[deprecated = "Trait has moved to `frame_support::dispatch`"] -pub trait GetDispatchInfo: dispatch::GetDispatchInfo { - fn get_dispatch_info(&self) -> dispatch::DispatchInfo { - ::get_dispatch_info(self) - } -} -#[deprecated = "Trait has moved to `frame_support::dispatch`"] -pub trait OneOrMany: dispatch::OneOrMany { - fn into_iter(self) -> Self::Iter - where - Self: Sized, - { - >::into_iter(self) - } -} -#[deprecated = "Enum has moved to `frame_support::dispatch`"] -pub type Pays = dispatch::Pays; -#[deprecated = "Trait has moved to `frame_support::dispatch`"] -pub trait PaysFee: dispatch::PaysFee { - fn pays_fee(&self, target: T) -> dispatch::Pays { - >::pays_fee(self, target) - } -} -#[deprecated = "Struct has moved to `frame_support::dispatch`"] -pub type PerDispatchClass = dispatch::PerDispatchClass; -#[deprecated = "Struct has moved to `frame_support::dispatch`"] -pub type PostDispatchInfo = dispatch::PostDispatchInfo; -#[deprecated = "Trait has moved to `frame_support::dispatch`"] -pub trait WeighData: dispatch::WeighData { - fn weigh_data(&self, target: T) -> Weight { - >::weigh_data(self, target) - } -} -#[deprecated = "Trait has moved to `frame_support::dispatch`"] -pub trait WithPostDispatchInfo: dispatch::WithPostDispatchInfo { - fn with_weight(self, actual_weight: Weight) -> dispatch::DispatchErrorWithPostInfo - where - Self: Sized, - { - ::with_weight(self, actual_weight) - } -}