mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
Update ui tests for rust 1.68
This commit is contained in:
@@ -23,17 +23,11 @@ error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Co
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: WrapperTypeEncode` is not satisfied
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:21:36
|
||||
|
|
||||
1 | / #[frame_support::pallet]
|
||||
2 | | mod pallet {
|
||||
3 | | use frame_support::pallet_prelude::{Hooks, DispatchResultWithPostInfo};
|
||||
4 | | use frame_system::pallet_prelude::{BlockNumberFor, OriginFor};
|
||||
... |
|
||||
16 | |
|
||||
17 | | #[pallet::call]
|
||||
| |__________________- required by a bound introduced by this call
|
||||
1 | #[frame_support::pallet]
|
||||
| ------------------------ required by a bound introduced by this call
|
||||
...
|
||||
21 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^^ the trait `WrapperTypeEncode` is not implemented for `<T as pallet::Config>::Bar`
|
||||
21 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^^ the trait `WrapperTypeEncode` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
= note: required for `<T as pallet::Config>::Bar` to implement `Encode`
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
error[E0277]: the trait bound `pallet::GenesisConfig: std::default::Default` is not satisfied
|
||||
--> tests/pallet_ui/genesis_default_not_satisfied.rs:22:18
|
||||
|
|
||||
22 | impl<T: Config> GenesisBuild<T> for GenesisConfig {}
|
||||
| ^^^^^^^^^^^^^^^ the trait `std::default::Default` is not implemented for `pallet::GenesisConfig`
|
||||
|
|
||||
--> tests/pallet_ui/genesis_default_not_satisfied.rs:22:38
|
||||
|
|
||||
22 | impl<T: Config> GenesisBuild<T> for GenesisConfig {}
|
||||
| ^^^^^^^^^^^^^ the trait `std::default::Default` is not implemented for `pallet::GenesisConfig`
|
||||
|
|
||||
note: required by a bound in `GenesisBuild`
|
||||
--> $WORKSPACE/frame/support/src/traits/hooks.rs
|
||||
|
|
||||
| pub trait GenesisBuild<T, I = ()>: Default + sp_runtime::traits::MaybeSerializeDeserialize {
|
||||
| ^^^^^^^ required by this bound in `GenesisBuild`
|
||||
--> $WORKSPACE/frame/support/src/traits/hooks.rs
|
||||
|
|
||||
| pub trait GenesisBuild<T, I = ()>: Default + sp_runtime::traits::MaybeSerializeDeserialize {
|
||||
| ^^^^^^^ required by this bound in `GenesisBuild`
|
||||
help: consider annotating `pallet::GenesisConfig` with `#[derive(Default)]`
|
||||
|
|
||||
19 | #[derive(Default)]
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
error[E0107]: missing generics for trait `Hooks`
|
||||
--> tests/pallet_ui/hooks_invalid_item.rs:12:18
|
||||
|
|
||||
12 | impl<T: Config> Hooks for Pallet<T> {}
|
||||
| ^^^^^ expected 1 generic argument
|
||||
|
|
||||
--> tests/pallet_ui/hooks_invalid_item.rs:12:18
|
||||
|
|
||||
12 | impl<T: Config> Hooks for Pallet<T> {}
|
||||
| ^^^^^ expected 1 generic argument
|
||||
|
|
||||
note: trait defined here, with 1 generic parameter: `BlockNumber`
|
||||
--> $WORKSPACE/frame/support/src/traits/hooks.rs
|
||||
|
|
||||
| pub trait Hooks<BlockNumber> {
|
||||
| ^^^^^ -----------
|
||||
--> $WORKSPACE/frame/support/src/traits/hooks.rs
|
||||
|
|
||||
| pub trait Hooks<BlockNumber> {
|
||||
| ^^^^^ -----------
|
||||
help: add missing generic argument
|
||||
|
|
||||
12 | impl<T: Config> Hooks<BlockNumber> for Pallet<T> {}
|
||||
| ~~~~~~~~~~~~~~~~~~
|
||||
| +++++++++++++
|
||||
|
||||
+1
-1
@@ -12,4 +12,4 @@ note: enum defined here, with 1 generic parameter: `T`
|
||||
help: add missing generic argument
|
||||
|
|
||||
17 | type Foo<T: Config> = StorageValue<_, u8, ResultQuery<Error<T>::NonExistentValue>>;
|
||||
| ~~~~~~~~
|
||||
| +++
|
||||
|
||||
+9
-9
@@ -1,52 +1,52 @@
|
||||
error[E0277]: the trait bound `<T as frame_system::Config>::AccountId: From<u32>` is not satisfied
|
||||
--> $DIR/type_value_forgotten_where_clause.rs:24:34
|
||||
--> tests/pallet_ui/type_value_forgotten_where_clause.rs:24:34
|
||||
|
|
||||
24 | #[pallet::type_value] fn Foo<T: Config>() -> u32 { 3u32 }
|
||||
| ^^^^^^ the trait `From<u32>` is not implemented for `<T as frame_system::Config>::AccountId`
|
||||
|
|
||||
note: required by a bound in `pallet::Config`
|
||||
--> $DIR/type_value_forgotten_where_clause.rs:8:51
|
||||
--> tests/pallet_ui/type_value_forgotten_where_clause.rs:8:51
|
||||
|
|
||||
7 | pub trait Config: frame_system::Config
|
||||
| ------ required by a bound in this
|
||||
8 | where <Self as frame_system::Config>::AccountId: From<u32>
|
||||
| ^^^^^^^^^ required by this bound in `pallet::Config`
|
||||
| ^^^^^^^^^ required by this bound in `Config`
|
||||
help: consider further restricting the associated type
|
||||
|
|
||||
24 | #[pallet::type_value] fn Foo<T: Config>() -> u32 where <T as frame_system::Config>::AccountId: From<u32> { 3u32 }
|
||||
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
error[E0277]: the trait bound `<T as frame_system::Config>::AccountId: From<u32>` is not satisfied
|
||||
--> $DIR/type_value_forgotten_where_clause.rs:24:12
|
||||
--> tests/pallet_ui/type_value_forgotten_where_clause.rs:24:12
|
||||
|
|
||||
24 | #[pallet::type_value] fn Foo<T: Config>() -> u32 { 3u32 }
|
||||
| ^^^^^^^^^^ the trait `From<u32>` is not implemented for `<T as frame_system::Config>::AccountId`
|
||||
|
|
||||
note: required by a bound in `pallet::Config`
|
||||
--> $DIR/type_value_forgotten_where_clause.rs:8:51
|
||||
--> tests/pallet_ui/type_value_forgotten_where_clause.rs:8:51
|
||||
|
|
||||
7 | pub trait Config: frame_system::Config
|
||||
| ------ required by a bound in this
|
||||
8 | where <Self as frame_system::Config>::AccountId: From<u32>
|
||||
| ^^^^^^^^^ required by this bound in `pallet::Config`
|
||||
| ^^^^^^^^^ required by this bound in `Config`
|
||||
help: consider further restricting the associated type
|
||||
|
|
||||
24 | #[pallet::type_value where <T as frame_system::Config>::AccountId: From<u32>] fn Foo<T: Config>() -> u32 { 3u32 }
|
||||
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
error[E0277]: the trait bound `<T as frame_system::Config>::AccountId: From<u32>` is not satisfied
|
||||
--> $DIR/type_value_forgotten_where_clause.rs:24:12
|
||||
--> tests/pallet_ui/type_value_forgotten_where_clause.rs:24:12
|
||||
|
|
||||
24 | #[pallet::type_value] fn Foo<T: Config>() -> u32 { 3u32 }
|
||||
| ^^^^^^^^^^ the trait `From<u32>` is not implemented for `<T as frame_system::Config>::AccountId`
|
||||
|
|
||||
note: required by a bound in `pallet::Config`
|
||||
--> $DIR/type_value_forgotten_where_clause.rs:8:51
|
||||
--> tests/pallet_ui/type_value_forgotten_where_clause.rs:8:51
|
||||
|
|
||||
7 | pub trait Config: frame_system::Config
|
||||
| ------ required by a bound in this
|
||||
8 | where <Self as frame_system::Config>::AccountId: From<u32>
|
||||
| ^^^^^^^^^ required by this bound in `pallet::Config`
|
||||
| ^^^^^^^^^ required by this bound in `Config`
|
||||
help: consider further restricting the associated type
|
||||
|
|
||||
24 | #[pallet::type_value] fn Foo<T: Config>() -> u32 where <T as frame_system::Config>::AccountId: From<u32> { 3u32 }
|
||||
|
||||
@@ -5,37 +5,3 @@ error: invalid suffix `something` for number literal
|
||||
| ^^^^^^^^^^^^^^^ invalid suffix `something`
|
||||
|
|
||||
= help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> tests/pallet_ui/weight_argument_has_suffix.rs:12:12
|
||||
|
|
||||
12 | #[pallet::call]
|
||||
| ^^^^
|
||||
| |
|
||||
| expected trait `frame_support::dispatch::ClassifyDispatch`, found trait `frame_support::dispatch::WeighData`
|
||||
| arguments to this function are incorrect
|
||||
|
|
||||
= note: expected reference `&dyn frame_support::dispatch::ClassifyDispatch<()>`
|
||||
found reference `&dyn frame_support::dispatch::WeighData<()>`
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/frame/support/src/dispatch.rs
|
||||
|
|
||||
| fn classify_dispatch(&self, target: T) -> DispatchClass;
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> tests/pallet_ui/weight_argument_has_suffix.rs:12:12
|
||||
|
|
||||
12 | #[pallet::call]
|
||||
| ^^^^
|
||||
| |
|
||||
| expected trait `frame_support::dispatch::PaysFee`, found trait `frame_support::dispatch::WeighData`
|
||||
| arguments to this function are incorrect
|
||||
|
|
||||
= note: expected reference `&dyn frame_support::dispatch::PaysFee<()>`
|
||||
found reference `&dyn frame_support::dispatch::WeighData<()>`
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/frame/support/src/dispatch.rs
|
||||
|
|
||||
| fn pays_fee(&self, _target: T) -> Pays;
|
||||
| ^^^^^^^^
|
||||
|
||||
Reference in New Issue
Block a user