Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
generics fix for dispatchables
Browse files Browse the repository at this point in the history
  • Loading branch information
sam0x17 committed Mar 9, 2023
1 parent 37be5a2 commit 29f7520
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frame/support/procedural/src/pallet/expand/doc_only.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use proc_macro2::Span;

use crate::pallet::Def;

pub fn expand_doc_only(def: &mut Def) -> proc_macro2::TokenStream {
Expand Down Expand Up @@ -45,6 +47,8 @@ pub fn expand_doc_only(def: &mut Def) -> proc_macro2::TokenStream {
}
};

let type_impl_generics = def.type_impl_generics(Span::call_site());

quote::quote!(
#[cfg(doc)]
pub mod storage_types {
Expand All @@ -56,7 +60,10 @@ pub fn expand_doc_only(def: &mut Def) -> proc_macro2::TokenStream {
#[cfg(doc)]
pub mod dispatchables {
use super::*;
#dispatchables
pub struct Dispatchables;
impl<#type_impl_generics> Dispatchables {
#dispatchables
}
}
)
}

0 comments on commit 29f7520

Please sign in to comment.