Remove #[pallet::generate_storage_info] from docs (#14116)

* Fix docs

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

* Add UI test

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-10 22:29:00 +02:00
committed by GitHub
parent 1858badf0f
commit bf506d41cb
4 changed files with 23 additions and 40 deletions
@@ -869,24 +869,6 @@ pub fn generate_store(_: TokenStream, _: TokenStream) -> TokenStream {
pallet_macro_stub()
}
/// To generate the full storage info (used for PoV calculation) use the attribute
/// `#[pallet::generate_storage_info]`, e.g.:
///
/// ```ignore
/// #[pallet::pallet]
/// #[pallet::generate_storage_info]
/// pub struct Pallet<T>(_);
/// ```
///
/// This requires all storage items to implement the trait `StorageInfoTrait`, thus all keys
/// and value types must be bound by `MaxEncodedLen`. Individual storages can opt-out from this
/// constraint by using [`#[pallet::unbounded]`](`macro@unbounded`) (see
/// [`#[pallet::storage]`](`macro@storage`) for more info).
#[proc_macro_attribute]
pub fn generate_storage_info(_: TokenStream, _: TokenStream) -> TokenStream {
pallet_macro_stub()
}
/// Because the `pallet::pallet` macro implements `GetStorageVersion`, the current storage
/// version needs to be communicated to the macro. This can be done by using the
/// `pallet::storage_version` attribute: