mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-08 14:48:01 +00:00
fix some failing ui tests (#9157)
* fix some failing ui tests * Update frame/support/test/tests/pallet_ui/call_argument_invalid_bound_2.stderr * Update frame/support/test/tests/pallet_ui/call_argument_invalid_bound_2.stderr * fix ui test * fix ui test * TRYBUILD=overwrite cargo test --workspace -- ui Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e5831c3db3
commit
46ccf17e7c
@@ -1,3 +1,21 @@
|
||||
error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
--> $DIR/call_argument_invalid_bound.rs:20:41
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
||||
|
|
||||
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
|
||||
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&<T as pallet::Config>::Bar`
|
||||
= note: required for the cast to the object type `dyn std::fmt::Debug`
|
||||
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
|
||||
--> $DIR/call_argument_invalid_bound.rs:20:41
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
= note: required by `clone`
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
|
||||
--> $DIR/call_argument_invalid_bound.rs:20:41
|
||||
|
|
||||
@@ -8,21 +26,3 @@ help: consider further restricting this bound
|
||||
|
|
||||
17 | #[pallet::call + std::cmp::PartialEq]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
|
||||
--> $DIR/call_argument_invalid_bound.rs:20:41
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
= note: required by `clone`
|
||||
|
||||
error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
--> $DIR/call_argument_invalid_bound.rs:20:41
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
||||
|
|
||||
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
|
||||
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&<T as pallet::Config>::Bar`
|
||||
= note: required for the cast to the object type `dyn std::fmt::Debug`
|
||||
|
||||
@@ -1,15 +1,31 @@
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: WrapperTypeDecode` is not satisfied
|
||||
--> $DIR/call_argument_invalid_bound_2.rs:20:41
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^ the trait `WrapperTypeDecode` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
::: /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-2.1.1/src/codec.rs:277:18
|
||||
|
|
||||
277 | fn decode<I: Input>(input: &mut I) -> Result<Self, Error>;
|
||||
| ----- required by this bound in `pallet::_::_parity_scale_codec::Decode::decode`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Decode` for `<T as pallet::Config>::Bar`
|
||||
error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
--> $DIR/call_argument_invalid_bound_2.rs:20:41
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
||||
|
|
||||
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
|
||||
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&<T as pallet::Config>::Bar`
|
||||
= note: required for the cast to the object type `dyn std::fmt::Debug`
|
||||
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
|
||||
--> $DIR/call_argument_invalid_bound_2.rs:20:41
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
= note: required by `clone`
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
|
||||
--> $DIR/call_argument_invalid_bound_2.rs:20:41
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^
|
||||
|
|
||||
help: consider further restricting this bound
|
||||
|
|
||||
17 | #[pallet::call + std::cmp::PartialEq]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: WrapperTypeEncode` is not satisfied
|
||||
--> $DIR/call_argument_invalid_bound_2.rs:20:41
|
||||
@@ -24,31 +40,15 @@ error[E0277]: the trait bound `<T as pallet::Config>::Bar: WrapperTypeEncode` is
|
||||
|
|
||||
= note: required because of the requirements on the impl of `pallet::_::_parity_scale_codec::Encode` for `<T as pallet::Config>::Bar`
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
|
||||
--> $DIR/call_argument_invalid_bound_2.rs:20:41
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^
|
||||
|
|
||||
help: consider further restricting this bound
|
||||
|
|
||||
17 | #[pallet::call + std::cmp::PartialEq]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
|
||||
--> $DIR/call_argument_invalid_bound_2.rs:20:41
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
= note: required by `clone`
|
||||
|
||||
error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
--> $DIR/call_argument_invalid_bound_2.rs:20:41
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
||||
|
|
||||
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
|
||||
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&<T as pallet::Config>::Bar`
|
||||
= note: required for the cast to the object type `dyn std::fmt::Debug`
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: WrapperTypeDecode` is not satisfied
|
||||
--> $DIR/call_argument_invalid_bound_2.rs:20:41
|
||||
|
|
||||
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^ the trait `WrapperTypeDecode` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
::: /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-2.1.1/src/codec.rs:277:18
|
||||
|
|
||||
277 | fn decode<I: Input>(input: &mut I) -> Result<Self, Error>;
|
||||
| ----- required by this bound in `pallet::_::_parity_scale_codec::Decode::decode`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Decode` for `<T as pallet::Config>::Bar`
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&Bar`
|
||||
--> $DIR/call_argument_invalid_bound_3.rs:22:41
|
||||
|
|
||||
22 | pub fn foo(origin: OriginFor<T>, bar: Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^
|
||||
|
|
||||
= note: an implementation of `std::cmp::PartialEq` might be missing for `&Bar`
|
||||
|
||||
error[E0277]: the trait bound `Bar: Clone` is not satisfied
|
||||
--> $DIR/call_argument_invalid_bound_3.rs:22:41
|
||||
|
|
||||
22 | pub fn foo(origin: OriginFor<T>, bar: Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^ the trait `Clone` is not implemented for `Bar`
|
||||
|
|
||||
= note: required by `clone`
|
||||
|
||||
error[E0277]: `Bar` doesn't implement `std::fmt::Debug`
|
||||
--> $DIR/call_argument_invalid_bound_3.rs:22:41
|
||||
|
|
||||
@@ -24,3 +8,19 @@ error[E0277]: `Bar` doesn't implement `std::fmt::Debug`
|
||||
= note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug`
|
||||
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&Bar`
|
||||
= note: required for the cast to the object type `dyn std::fmt::Debug`
|
||||
|
||||
error[E0277]: the trait bound `Bar: Clone` is not satisfied
|
||||
--> $DIR/call_argument_invalid_bound_3.rs:22:41
|
||||
|
|
||||
22 | pub fn foo(origin: OriginFor<T>, bar: Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^ the trait `Clone` is not implemented for `Bar`
|
||||
|
|
||||
= note: required by `clone`
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&Bar`
|
||||
--> $DIR/call_argument_invalid_bound_3.rs:22:41
|
||||
|
|
||||
22 | pub fn foo(origin: OriginFor<T>, bar: Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^
|
||||
|
|
||||
= note: an implementation of `std::cmp::PartialEq` might be missing for `&Bar`
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
|
||||
--> $DIR/event_field_not_member.rs:23:7
|
||||
|
|
||||
23 | B { b: T::Bar },
|
||||
| ^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
||||
| ^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
|
||||
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&<T as pallet::Config>::Bar`
|
||||
= note: required for the cast to the object type `dyn std::fmt::Debug`
|
||||
= note: required by `clone`
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
|
||||
--> $DIR/event_field_not_member.rs:23:7
|
||||
@@ -19,10 +17,12 @@ help: consider further restricting this bound
|
||||
22 | pub enum Event<T: Config + std::cmp::PartialEq> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
|
||||
error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
--> $DIR/event_field_not_member.rs:23:7
|
||||
|
|
||||
23 | B { b: T::Bar },
|
||||
| ^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
| ^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
||||
|
|
||||
= note: required by `clone`
|
||||
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
|
||||
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&<T as pallet::Config>::Bar`
|
||||
= note: required for the cast to the object type `dyn std::fmt::Debug`
|
||||
|
||||
@@ -4,6 +4,6 @@ error[E0277]: the trait bound `Bar: MaxEncodedLen` is not satisfied
|
||||
10 | #[pallet::generate_storage_info]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ the trait `MaxEncodedLen` is not implemented for `Bar`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `KeyGeneratorMaxEncodedLen` for `NMapKey<frame_support::Twox64Concat, Bar>`
|
||||
= note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageNMap<_GeneratedPrefixForStorageFoo<T>, NMapKey<frame_support::Twox64Concat, Bar>, u32>`
|
||||
= note: required because of the requirements on the impl of `KeyGeneratorMaxEncodedLen` for `Key<frame_support::Twox64Concat, Bar>`
|
||||
= note: required because of the requirements on the impl of `StorageInfoTrait` for `frame_support::pallet_prelude::StorageNMap<_GeneratedPrefixForStorageFoo<T>, Key<frame_support::Twox64Concat, Bar>, u32>`
|
||||
= note: required by `storage_info`
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error: Union types are not supported
|
||||
--> $DIR/union.rs:5:1
|
||||
|
|
||||
5 | union Union {
|
||||
| ^^^^^
|
||||
|
||||
error: Union types are not supported.
|
||||
--> $DIR/union.rs:5:1
|
||||
|
|
||||
5 | union Union {
|
||||
| ^^^^^
|
||||
|
||||
error: Union types are not supported
|
||||
--> $DIR/union.rs:5:1
|
||||
|
|
||||
5 | union Union {
|
||||
| ^^^^^
|
||||
|
||||
@@ -5,7 +5,10 @@ error[E0053]: method `test` has an incompatible type for trait
|
||||
| --- type in trait
|
||||
...
|
||||
19 | fn test(data: String) {}
|
||||
| ^^^^^^ expected `u64`, found struct `std::string::String`
|
||||
| ^^^^^^
|
||||
| |
|
||||
| expected `u64`, found struct `std::string::String`
|
||||
| help: change the parameter type to match the trait: `u64`
|
||||
|
|
||||
= note: expected fn pointer `fn(u64)`
|
||||
found fn pointer `fn(std::string::String)`
|
||||
@@ -21,7 +24,17 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
|
||||
| |_- type in trait
|
||||
16 |
|
||||
17 | sp_api::impl_runtime_apis! {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found struct `std::string::String`
|
||||
| -^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| _expected `u64`, found struct `std::string::String`
|
||||
| |
|
||||
18 | | impl self::Api<Block> for Runtime {
|
||||
19 | | fn test(data: String) {}
|
||||
20 | | }
|
||||
... |
|
||||
32 | | }
|
||||
33 | | }
|
||||
| |_- help: change the parameter type to match the trait: `std::option::Option<u64>`
|
||||
|
|
||||
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> Result<_, _>`
|
||||
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<std::string::String>, Vec<_>) -> Result<_, _>`
|
||||
|
||||
@@ -22,7 +22,17 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
|
||||
| |_- type in trait
|
||||
...
|
||||
12 | sp_api::mock_impl_runtime_apis! {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `()`
|
||||
| -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| _expected `u64`, found `()`
|
||||
| |
|
||||
13 | | impl Api<Block> for MockApi {
|
||||
14 | | fn test(self, data: u64) {}
|
||||
15 | |
|
||||
16 | | fn test2(&mut self, data: u64) {}
|
||||
17 | | }
|
||||
18 | | }
|
||||
| |_- help: change the parameter type to match the trait: `Option<u64>`
|
||||
|
|
||||
= note: expected fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<u64>, Vec<_>) -> Result<_, _>`
|
||||
found fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<()>, Vec<_>) -> Result<_, _>`
|
||||
@@ -40,7 +50,17 @@ error[E0053]: method `Api_test2_runtime_api_impl` has an incompatible type for t
|
||||
| |_- type in trait
|
||||
...
|
||||
12 | sp_api::mock_impl_runtime_apis! {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `()`
|
||||
| -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| _expected `u64`, found `()`
|
||||
| |
|
||||
13 | | impl Api<Block> for MockApi {
|
||||
14 | | fn test(self, data: u64) {}
|
||||
15 | |
|
||||
16 | | fn test2(&mut self, data: u64) {}
|
||||
17 | | }
|
||||
18 | | }
|
||||
| |_- help: change the parameter type to match the trait: `Option<u64>`
|
||||
|
|
||||
= note: expected fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<u64>, Vec<_>) -> Result<_, _>`
|
||||
found fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<()>, Vec<_>) -> Result<_, _>`
|
||||
|
||||
+15
-2
@@ -5,7 +5,10 @@ error[E0053]: method `test` has an incompatible type for trait
|
||||
| --- type in trait
|
||||
...
|
||||
19 | fn test(data: &u64) {
|
||||
| ^^^^ expected `u64`, found `&u64`
|
||||
| ^^^^
|
||||
| |
|
||||
| expected `u64`, found `&u64`
|
||||
| help: change the parameter type to match the trait: `u64`
|
||||
|
|
||||
= note: expected fn pointer `fn(u64)`
|
||||
found fn pointer `fn(&u64)`
|
||||
@@ -21,7 +24,17 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
|
||||
| |_- type in trait
|
||||
16 |
|
||||
17 | sp_api::impl_runtime_apis! {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `&u64`
|
||||
| -^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| _expected `u64`, found `&u64`
|
||||
| |
|
||||
18 | | impl self::Api<Block> for Runtime {
|
||||
19 | | fn test(data: &u64) {
|
||||
20 | | unimplemented!()
|
||||
... |
|
||||
34 | | }
|
||||
35 | | }
|
||||
| |_- help: change the parameter type to match the trait: `std::option::Option<u64>`
|
||||
|
|
||||
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> Result<_, _>`
|
||||
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<&u64>, Vec<_>) -> Result<_, _>`
|
||||
|
||||
Reference in New Issue
Block a user