IntegrityTest implementation should be feature gated (#13094)

* `IntegrityTest` implementation should be feature gated

The initial implementation for the old declarative macros is still feature gating the
implementation. As we only call this in a test, there is no need to have this compiled for wasm.

* Don't assume that all "consumers" have a `std` feature
This commit is contained in:
Bastian Köcher
2023-01-11 16:40:52 +01:00
committed by GitHub
parent 836acb1bd3
commit 1b01bf8da2
3 changed files with 15 additions and 12 deletions
@@ -191,16 +191,19 @@ pub fn expand_hooks(def: &mut Def) -> proc_macro2::TokenStream {
}
}
impl<#type_impl_gen>
#frame_support::traits::IntegrityTest
// Integrity tests are only required for when `std` is enabled.
#frame_support::std_enabled! {
impl<#type_impl_gen>
#frame_support::traits::IntegrityTest
for #pallet_ident<#type_use_gen> #where_clause
{
fn integrity_test() {
<
Self as #frame_support::traits::Hooks<
{
fn integrity_test() {
<
Self as #frame_support::traits::Hooks<
<T as #frame_system::Config>::BlockNumber
>
>::integrity_test()
>
>::integrity_test()
}
}
}