Update ui tests for rust 1.68

This commit is contained in:
Mira Ressel
2023-03-15 22:55:40 +01:00
parent 83068ca822
commit fc5b3f4f1c
18 changed files with 83 additions and 162 deletions
@@ -8,9 +8,12 @@ error[E0412]: cannot find type `RuntimeCall` in this scope
--> tests/construct_runtime_ui/both_use_and_excluded_parts.rs:18:64
|
18 | pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Signature, ()>;
| - ^^^^^^^^^^^ not found in this scope
| |
| help: you might be missing a type parameter: `<RuntimeCall>`
| ^^^^^^^^^^^ not found in this scope
|
help: you might be missing a type parameter
|
18 | pub type UncheckedExtrinsic<RuntimeCall> = generic::UncheckedExtrinsic<u32, RuntimeCall, Signature, ()>;
| +++++++++++++
error[E0412]: cannot find type `Runtime` in this scope
--> tests/construct_runtime_ui/both_use_and_excluded_parts.rs:20:25
@@ -8,9 +8,12 @@ error[E0412]: cannot find type `RuntimeCall` in this scope
--> tests/construct_runtime_ui/exclude_undefined_part.rs:23:64
|
23 | pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Signature, ()>;
| - ^^^^^^^^^^^ not found in this scope
| |
| help: you might be missing a type parameter: `<RuntimeCall>`
| ^^^^^^^^^^^ not found in this scope
|
help: you might be missing a type parameter
|
23 | pub type UncheckedExtrinsic<RuntimeCall> = generic::UncheckedExtrinsic<u32, RuntimeCall, Signature, ()>;
| +++++++++++++
error[E0412]: cannot find type `Runtime` in this scope
--> tests/construct_runtime_ui/exclude_undefined_part.rs:25:25
@@ -29,18 +29,3 @@ help: consider importing this struct
|
1 | use frame_system::GenesisConfig;
|
error[E0283]: type annotations needed
--> tests/construct_runtime_ui/no_std_genesis_config.rs:40:1
|
40 | / construct_runtime! {
41 | | pub struct Runtime where
42 | | Block = Block,
43 | | NodeBlock = Block,
... |
48 | | }
49 | | }
| |_^ cannot infer type
|
= note: cannot satisfy `_: std::default::Default`
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -18,7 +18,7 @@ error: cannot find macro `decl_storage` in this scope
6 | decl_storage! {
| ^^^^^^^^^^^^
|
= note: consider importing this macro:
= help: consider importing this macro:
frame_support::decl_storage
error: cannot find macro `decl_module` in this scope
@@ -27,5 +27,5 @@ error: cannot find macro `decl_module` in this scope
10 | decl_module! {
| ^^^^^^^^^^^
|
= note: consider importing this macro:
= help: consider importing this macro:
frame_support::decl_module
@@ -32,18 +32,3 @@ help: consider importing this struct
|
1 | use frame_system::GenesisConfig;
|
error[E0283]: type annotations needed
--> tests/construct_runtime_ui/undefined_genesis_config_part.rs:49:1
|
49 | / construct_runtime! {
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
| |_^ cannot infer type
|
= note: cannot satisfy `_: std::default::Default`
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -15,7 +15,7 @@ error: `Pallet` does not have #[pallet::inherent] defined, perhaps you should re
|
= note: this error originates in the macro `pallet::__substrate_inherent_check::is_inherent_part_defined` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: no function or associated item named `create_inherent` found for struct `pallet::Pallet` in the current scope
error[E0599]: no function or associated item named `create_inherent` found for struct `Pallet` in the current scope
--> tests/construct_runtime_ui/undefined_inherent_part.rs:49:1
|
11 | pub struct Pallet<T>(_);
@@ -28,14 +28,14 @@ error[E0599]: no function or associated item named `create_inherent` found for s
... |
57 | | }
58 | | }
| |_^ function or associated item not found in `pallet::Pallet<Runtime>`
| |_^ function or associated item not found in `Pallet<Runtime>`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `create_inherent`, perhaps you need to implement it:
candidate #1: `ProvideInherent`
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: no function or associated item named `is_inherent` found for struct `pallet::Pallet` in the current scope
error[E0599]: no function or associated item named `is_inherent` found for struct `Pallet` in the current scope
--> tests/construct_runtime_ui/undefined_inherent_part.rs:49:1
|
11 | pub struct Pallet<T>(_);
@@ -48,14 +48,14 @@ error[E0599]: no function or associated item named `is_inherent` found for struc
... |
57 | | }
58 | | }
| |_^ function or associated item not found in `pallet::Pallet<Runtime>`
| |_^ function or associated item not found in `Pallet<Runtime>`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `is_inherent`, perhaps you need to implement it:
candidate #1: `ProvideInherent`
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: no function or associated item named `check_inherent` found for struct `pallet::Pallet` in the current scope
error[E0599]: no function or associated item named `check_inherent` found for struct `Pallet` in the current scope
--> tests/construct_runtime_ui/undefined_inherent_part.rs:49:1
|
11 | pub struct Pallet<T>(_);
@@ -68,14 +68,14 @@ error[E0599]: no function or associated item named `check_inherent` found for st
... |
57 | | }
58 | | }
| |_^ function or associated item not found in `pallet::Pallet<Runtime>`
| |_^ function or associated item not found in `Pallet<Runtime>`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `check_inherent`, perhaps you need to implement it:
candidate #1: `ProvideInherent`
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: no associated item named `INHERENT_IDENTIFIER` found for struct `pallet::Pallet` in the current scope
error[E0599]: no associated item named `INHERENT_IDENTIFIER` found for struct `Pallet` in the current scope
--> tests/construct_runtime_ui/undefined_inherent_part.rs:49:1
|
11 | pub struct Pallet<T>(_);
@@ -88,14 +88,14 @@ error[E0599]: no associated item named `INHERENT_IDENTIFIER` found for struct `p
... |
57 | | }
58 | | }
| |_^ associated item not found in `pallet::Pallet<Runtime>`
| |_^ associated item not found in `Pallet<Runtime>`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `INHERENT_IDENTIFIER`, perhaps you need to implement it:
candidate #1: `ProvideInherent`
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: no function or associated item named `is_inherent_required` found for struct `pallet::Pallet` in the current scope
error[E0599]: no function or associated item named `is_inherent_required` found for struct `Pallet` in the current scope
--> tests/construct_runtime_ui/undefined_inherent_part.rs:49:1
|
11 | pub struct Pallet<T>(_);
@@ -108,7 +108,7 @@ error[E0599]: no function or associated item named `is_inherent_required` found
... |
57 | | }
58 | | }
| |_^ function or associated item not found in `pallet::Pallet<Runtime>`
| |_^ function or associated item not found in `Pallet<Runtime>`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `is_inherent_required`, perhaps you need to implement it:
@@ -32,21 +32,3 @@ help: consider importing this type alias
|
1 | use frame_system::Origin;
|
error[E0282]: type annotations needed
--> tests/construct_runtime_ui/undefined_origin_part.rs:49:1
|
49 | / construct_runtime! {
50 | | pub struct Runtime where
51 | | Block = Block,
52 | | NodeBlock = Block,
... |
57 | | }
58 | | }
| |_^ cannot infer type of the type parameter `AccountId` declared on the enum `RawOrigin`
|
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider specifying the generic argument
|
58 | }::<AccountId>
| +++++++++++++
@@ -29,7 +29,7 @@ error[E0599]: no variant or associated item named `Pallet` found for enum `Runti
58 | | }
| |_- variant or associated item `Pallet` not found for this enum
error[E0599]: no function or associated item named `pre_dispatch` found for struct `pallet::Pallet` in the current scope
error[E0599]: no function or associated item named `pre_dispatch` found for struct `Pallet` in the current scope
--> tests/construct_runtime_ui/undefined_validate_unsigned_part.rs:49:1
|
11 | pub struct Pallet<T>(_);
@@ -42,7 +42,7 @@ error[E0599]: no function or associated item named `pre_dispatch` found for stru
... |
57 | | }
58 | | }
| |_^ function or associated item not found in `pallet::Pallet<Runtime>`
| |_^ function or associated item not found in `Pallet<Runtime>`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following traits define an item `pre_dispatch`, perhaps you need to implement one of them:
@@ -50,7 +50,7 @@ error[E0599]: no function or associated item named `pre_dispatch` found for stru
candidate #2: `ValidateUnsigned`
= note: this error originates in the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: no function or associated item named `validate_unsigned` found for struct `pallet::Pallet` in the current scope
error[E0599]: no function or associated item named `validate_unsigned` found for struct `Pallet` in the current scope
--> tests/construct_runtime_ui/undefined_validate_unsigned_part.rs:49:1
|
11 | pub struct Pallet<T>(_);
@@ -63,7 +63,7 @@ error[E0599]: no function or associated item named `validate_unsigned` found for
... |
57 | | }
58 | | }
| |_^ function or associated item not found in `pallet::Pallet<Runtime>`
| |_^ function or associated item not found in `Pallet<Runtime>`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following traits define an item `validate_unsigned`, perhaps you need to implement one of them:
@@ -8,9 +8,12 @@ error[E0412]: cannot find type `RuntimeCall` in this scope
--> tests/construct_runtime_ui/use_undefined_part.rs:23:64
|
23 | pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Signature, ()>;
| - ^^^^^^^^^^^ not found in this scope
| |
| help: you might be missing a type parameter: `<RuntimeCall>`
| ^^^^^^^^^^^ not found in this scope
|
help: you might be missing a type parameter
|
23 | pub type UncheckedExtrinsic<RuntimeCall> = generic::UncheckedExtrinsic<u32, RuntimeCall, Signature, ()>;
| +++++++++++++
error[E0412]: cannot find type `Runtime` in this scope
--> tests/construct_runtime_ui/use_undefined_part.rs:25:25
@@ -1,12 +1,12 @@
error[E0277]: can't compare `Foo<T>` with `Foo<T>`
--> tests/derive_no_bound_ui/eq.rs:6:8
|
6 | struct Foo<T: Config> {
| ^^^ no implementation for `Foo<T> == Foo<T>`
|
= help: the trait `PartialEq` is not implemented for `Foo<T>`
--> tests/derive_no_bound_ui/eq.rs:6:8
|
6 | struct Foo<T: Config> {
| ^^^^^^^^^^^^^^ no implementation for `Foo<T> == Foo<T>`
|
= help: the trait `PartialEq` is not implemented for `Foo<T>`
note: required by a bound in `std::cmp::Eq`
--> $RUST/core/src/cmp.rs
|
| pub trait Eq: PartialEq<Self> {
| ^^^^^^^^^^^^^^^ required by this bound in `std::cmp::Eq`
--> $RUST/core/src/cmp.rs
|
| pub trait Eq: PartialEq<Self> {
| ^^^^^^^^^^^^^^^ required by this bound in `Eq`
@@ -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> {}
| ~~~~~~~~~~~~~~~~~~
| +++++++++++++
@@ -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>>;
| ~~~~~~~~
| +++
@@ -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;
| ^^^^^^^^