From 4c84f8748e5395852a9e0e25b0404953fee1a59e Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 22 Dec 2022 18:16:41 +0100 Subject: [PATCH] WIP Signed-off-by: Oliver Tale-Yazdi --- .../storage_pov_estimate_as_generic.rs | 19 +++++++++++++++++++ .../storage_pov_estimate_as_generic.stderr | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 frame/support/test/tests/pallet_ui/storage_pov_estimate_as_generic.rs create mode 100644 frame/support/test/tests/pallet_ui/storage_pov_estimate_as_generic.stderr diff --git a/frame/support/test/tests/pallet_ui/storage_pov_estimate_as_generic.rs b/frame/support/test/tests/pallet_ui/storage_pov_estimate_as_generic.rs new file mode 100644 index 0000000000000..ed31b0590bd3b --- /dev/null +++ b/frame/support/test/tests/pallet_ui/storage_pov_estimate_as_generic.rs @@ -0,0 +1,19 @@ +#[frame_support::pallet] +mod pallet { + use frame_support::pallet_prelude::*; + + #[pallet::config] + pub trait Config: frame_system::Config {} + + #[pallet::pallet] + pub struct Pallet(_); + + #[pallet::error] + pub enum Error {} + + #[pallet::storage] + type Foo = StorageValue; +} + +fn main() { +} diff --git a/frame/support/test/tests/pallet_ui/storage_pov_estimate_as_generic.stderr b/frame/support/test/tests/pallet_ui/storage_pov_estimate_as_generic.stderr new file mode 100644 index 0000000000000..a649edc848e39 --- /dev/null +++ b/frame/support/test/tests/pallet_ui/storage_pov_estimate_as_generic.stderr @@ -0,0 +1,5 @@ +error: Invalid pallet::storage, Unexpected generic `ProofSize` for `StorageValue`. `StorageValue` expect generics `Value`, and optional generics `QueryKind`, `OnEmpty`. + --> tests/pallet_ui/storage_pov_estimate_as_generic.rs:15:49 + | +15 | type Foo = StorageValue; + | ^^^^^^^^^