Unverified Commit 9fe9a422 authored by Andrew Jones's avatar Andrew Jones Committed by GitHub
Browse files

Fix UI tests for latest stable `1.64` (#1416)

parent 69f959f2
Pipeline #217339 passed with stages
in 22 minutes and 10 seconds
error[E0637]: `&` without an explicit lifetime name cannot be used here
--> tests/ui/contract/fail/constructor-self-receiver-03.rs:8:34
|
8 | pub fn constructor(this: &Self) -> Self {
| ^ explicit lifetime name needed here
error[E0411]: cannot find type `Self` in this scope
--> tests/ui/contract/fail/constructor-self-receiver-03.rs:8:35
|
......@@ -16,13 +22,14 @@ error[E0411]: cannot find type `Self` in this scope
8 | pub fn constructor(this: &Self) -> Self {
| ^^^^ `Self` is only available in impls, traits, and type definitions
error[E0106]: missing lifetime specifier
--> tests/ui/contract/fail/constructor-self-receiver-03.rs:8:34
error[E0277]: the trait bound `&'static Contract: WrapperTypeDecode` is not satisfied
--> tests/ui/contract/fail/constructor-self-receiver-03.rs:8:9
|
8 | pub fn constructor(this: &Self) -> Self {
| ^ expected named lifetime parameter
|
help: consider introducing a named lifetime parameter
| ^^^ the trait `WrapperTypeDecode` is not implemented for `&'static Contract`
|
8 | pub<'a> fn constructor(this: &'a Self) -> Self {
| ++++ ++
= help: the following other types implement trait `WrapperTypeDecode`:
Arc<T>
Box<T>
Rc<T>
= note: required because of the requirements on the impl of `parity_scale_codec::Decode` for `&'static Contract`
error[E0277]: the trait bound `EventTopics<4_usize>: RespectTopicLimit<2_usize>` is not satisfied
error[E0277]: the trait bound `EventTopics<4>: RespectTopicLimit<2>` is not satisfied
--> tests/ui/contract/fail/event-too-many-topics-anonymous.rs:25:5
|
25 | pub struct Event {
| ^^^ the trait `RespectTopicLimit<2_usize>` is not implemented for `EventTopics<4_usize>`
| ^^^ the trait `RespectTopicLimit<2>` is not implemented for `EventTopics<4>`
|
= help: the following other types implement trait `RespectTopicLimit<N>`:
<EventTopics<0_usize> as RespectTopicLimit<0_usize>>
<EventTopics<0_usize> as RespectTopicLimit<10_usize>>
<EventTopics<0_usize> as RespectTopicLimit<11_usize>>
<EventTopics<0_usize> as RespectTopicLimit<12_usize>>
<EventTopics<0_usize> as RespectTopicLimit<1_usize>>
<EventTopics<0_usize> as RespectTopicLimit<2_usize>>
<EventTopics<0_usize> as RespectTopicLimit<3_usize>>
<EventTopics<0_usize> as RespectTopicLimit<4_usize>>
<EventTopics<0> as RespectTopicLimit<0>>
<EventTopics<0> as RespectTopicLimit<10>>
<EventTopics<0> as RespectTopicLimit<11>>
<EventTopics<0> as RespectTopicLimit<12>>
<EventTopics<0> as RespectTopicLimit<1>>
<EventTopics<0> as RespectTopicLimit<2>>
<EventTopics<0> as RespectTopicLimit<3>>
<EventTopics<0> as RespectTopicLimit<4>>
and 83 others
note: required by a bound in `EventRespectsTopicLimit`
--> src/codegen/event/topics.rs
......
error[E0277]: the trait bound `EventTopics<3_usize>: RespectTopicLimit<2_usize>` is not satisfied
error[E0277]: the trait bound `EventTopics<3>: RespectTopicLimit<2>` is not satisfied
--> tests/ui/contract/fail/event-too-many-topics.rs:25:5
|
25 | pub struct Event {
| ^^^ the trait `RespectTopicLimit<2_usize>` is not implemented for `EventTopics<3_usize>`
| ^^^ the trait `RespectTopicLimit<2>` is not implemented for `EventTopics<3>`
|
= help: the following other types implement trait `RespectTopicLimit<N>`:
<EventTopics<0_usize> as RespectTopicLimit<0_usize>>
<EventTopics<0_usize> as RespectTopicLimit<10_usize>>
<EventTopics<0_usize> as RespectTopicLimit<11_usize>>
<EventTopics<0_usize> as RespectTopicLimit<12_usize>>
<EventTopics<0_usize> as RespectTopicLimit<1_usize>>
<EventTopics<0_usize> as RespectTopicLimit<2_usize>>
<EventTopics<0_usize> as RespectTopicLimit<3_usize>>
<EventTopics<0_usize> as RespectTopicLimit<4_usize>>
<EventTopics<0> as RespectTopicLimit<0>>
<EventTopics<0> as RespectTopicLimit<10>>
<EventTopics<0> as RespectTopicLimit<11>>
<EventTopics<0> as RespectTopicLimit<12>>
<EventTopics<0> as RespectTopicLimit<1>>
<EventTopics<0> as RespectTopicLimit<2>>
<EventTopics<0> as RespectTopicLimit<3>>
<EventTopics<0> as RespectTopicLimit<4>>
and 83 others
note: required by a bound in `EventRespectsTopicLimit`
--> src/codegen/event/topics.rs
......
......@@ -11,7 +11,7 @@ error[E0599]: no function or associated item named `constructor_2` found for str
--> tests/ui/contract/fail/impl-block-for-non-storage-01.rs:20:16
|
4 | pub struct Contract {}
| --- function or associated item `constructor_2` not found for this
| --- function or associated item `constructor_2` not found for this struct
...
20 | pub fn constructor_2() -> Self {
| ^^^^^^^^^^^^^
......@@ -23,7 +23,7 @@ error[E0599]: no function or associated item named `message_2` found for struct
--> tests/ui/contract/fail/impl-block-for-non-storage-01.rs:25:16
|
4 | pub struct Contract {}
| --- function or associated item `message_2` not found for this
| --- function or associated item `message_2` not found for this struct
...
25 | pub fn message_2(&self) {}
| ^^^^^^^^^
......
......@@ -2,7 +2,7 @@ error[E0599]: no function or associated item named `env` found for struct `Contr
--> tests/ui/contract/fail/impl-block-using-static-env-no-marker.rs:20:27
|
4 | pub struct Contract {}
| --- function or associated item `env` not found for this
| --- function or associated item `env` not found for this struct
...
20 | let _ = Self::env().caller();
| ^^^ function or associated item not found in `Contract`
......
......@@ -48,7 +48,7 @@ error[E0599]: the method `fire` exists for struct `ink::ink_env::call::CallBuild
--> tests/ui/contract/fail/message-returns-non-codec.rs:16:9
|
4 | pub struct NonCodecType;
| ------------------------ doesn't satisfy `NonCodecType: parity_scale_codec::Decode`
| ----------------------- doesn't satisfy `NonCodecType: parity_scale_codec::Decode`
...
16 | pub fn message(&self) -> NonCodecType {
| ^^^ method cannot be called on `ink::ink_env::call::CallBuilder<DefaultEnvironment, Set<Call<DefaultEnvironment>>, Set<ExecutionInput<ArgumentList<ArgumentListEnd, ArgumentListEnd>>>, Set<ReturnType<NonCodecType>>>` due to unsatisfied trait bounds
......@@ -58,11 +58,5 @@ error[E0599]: the method `fire` exists for struct `ink::ink_env::call::CallBuild
note: the following trait must be implemented
--> $CARGO/parity-scale-codec-3.2.1/src/codec.rs
|
| / pub trait Decode: Sized {
| | // !INTERNAL USE ONLY!
| | // This const helps SCALE to optimize the encoding/decoding by doing fake specialization.
| | #[doc(hidden)]
... |
| | }
| | }
| |_^
| pub trait Decode: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^
......@@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> tests/ui/contract/fail/trait-message-selector-mismatch.rs:23:9
|
23 | fn message(&self) {}
| ^^ expected `1_u32`, found `2_u32`
| ^^ expected `1`, found `2`
|
= note: expected struct `TraitMessageSelector<1_u32>`
found struct `TraitMessageSelector<2_u32>`
= note: expected struct `TraitMessageSelector<1>`
found struct `TraitMessageSelector<2>`
error[E0119]: conflicting implementations of trait `ink::reflect::DispatchableMessageInfo<1083895717_u32>` for type `contract::Contract`
error[E0119]: conflicting implementations of trait `ink::reflect::DispatchableMessageInfo<1083895717>` for type `contract::Contract`
--> tests/ui/contract/fail/trait-message-selector-overlap-1.rs:41:9
|
36 | fn message(&self) {}
......@@ -7,7 +7,7 @@ error[E0119]: conflicting implementations of trait `ink::reflect::DispatchableMe
41 | fn message(&self) {}
| ^^ conflicting implementation for `contract::Contract`
error[E0119]: conflicting implementations of trait `ink::codegen::TraitCallForwarderFor<1083895717_u32>` for type `contract::_::CallBuilder`
error[E0119]: conflicting implementations of trait `ink::codegen::TraitCallForwarderFor<1083895717>` for type `contract::_::CallBuilder`
--> tests/ui/contract/fail/trait-message-selector-overlap-1.rs:39:5
|
34 | impl TraitDefinition1 for Contract {
......
error[E0119]: conflicting implementations of trait `ink::reflect::DispatchableMessageInfo<1518209067_u32>` for type `contract::Contract`
error[E0119]: conflicting implementations of trait `ink::reflect::DispatchableMessageInfo<1518209067>` for type `contract::Contract`
--> tests/ui/contract/fail/trait-message-selector-overlap-2.rs:41:9
|
36 | fn message(&self) {}
......@@ -7,7 +7,7 @@ error[E0119]: conflicting implementations of trait `ink::reflect::DispatchableMe
41 | fn message(&self) {}
| ^^ conflicting implementation for `contract::Contract`
error[E0119]: conflicting implementations of trait `ink::codegen::TraitCallForwarderFor<1518209067_u32>` for type `contract::_::CallBuilder`
error[E0119]: conflicting implementations of trait `ink::codegen::TraitCallForwarderFor<1518209067>` for type `contract::_::CallBuilder`
--> tests/ui/contract/fail/trait-message-selector-overlap-2.rs:39:5
|
34 | impl TraitDefinition1 for Contract {
......
error[E0119]: conflicting implementations of trait `ink::reflect::DispatchableMessageInfo<42_u32>` for type `contract::Contract`
error[E0119]: conflicting implementations of trait `ink::reflect::DispatchableMessageInfo<42>` for type `contract::Contract`
--> tests/ui/contract/fail/trait-message-selector-overlap-3.rs:41:9
|
36 | fn message1(&self) {}
......@@ -7,7 +7,7 @@ error[E0119]: conflicting implementations of trait `ink::reflect::DispatchableMe
41 | fn message2(&self) {}
| ^^ conflicting implementation for `contract::Contract`
error[E0119]: conflicting implementations of trait `ink::codegen::TraitCallForwarderFor<42_u32>` for type `contract::_::CallBuilder`
error[E0119]: conflicting implementations of trait `ink::codegen::TraitCallForwarderFor<42>` for type `contract::_::CallBuilder`
--> tests/ui/contract/fail/trait-message-selector-overlap-3.rs:39:5
|
34 | impl TraitDefinition1 for Contract {
......
......@@ -7,7 +7,7 @@ error[E0277]: the trait bound `Vec<NonPacked>: parity_scale_codec::Decode` is no
= help: the trait `parity_scale_codec::Decode` is implemented for `Vec<T>`
= note: required because of the requirements on the impl of `Packed` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `StorableHint<()>` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032_u32>>` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032>>` for `Vec<NonPacked>`
error[E0277]: the trait bound `[NonPacked]: Encode` is not satisfied
--> tests/ui/storage_item/fail/collections_only_packed_1.rs:11:8
......@@ -21,7 +21,7 @@ error[E0277]: the trait bound `[NonPacked]: Encode` is not satisfied
= note: required because of the requirements on the impl of `Encode` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `Packed` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `StorableHint<()>` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032_u32>>` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032>>` for `Vec<NonPacked>`
error[E0277]: the trait bound `Vec<NonPacked>: parity_scale_codec::Decode` is not satisfied
--> tests/ui/storage_item/fail/collections_only_packed_1.rs:9:1
......@@ -32,7 +32,7 @@ error[E0277]: the trait bound `Vec<NonPacked>: parity_scale_codec::Decode` is no
= help: the trait `parity_scale_codec::Decode` is implemented for `Vec<T>`
= note: required because of the requirements on the impl of `Packed` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `StorableHint<()>` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032_u32>>` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032>>` for `Vec<NonPacked>`
note: required because it appears within the type `Contract`
--> tests/ui/storage_item/fail/collections_only_packed_1.rs:10:8
|
......@@ -57,7 +57,7 @@ error[E0277]: the trait bound `[NonPacked]: Encode` is not satisfied
= note: required because of the requirements on the impl of `Encode` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `Packed` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `StorableHint<()>` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032_u32>>` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032>>` for `Vec<NonPacked>`
note: required because it appears within the type `Contract`
--> tests/ui/storage_item/fail/collections_only_packed_1.rs:10:8
|
......@@ -79,7 +79,7 @@ error[E0277]: the trait bound `Vec<NonPacked>: parity_scale_codec::Decode` is no
= help: the trait `parity_scale_codec::Decode` is implemented for `Vec<T>`
= note: required because of the requirements on the impl of `Packed` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `StorableHint<()>` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032_u32>>` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032>>` for `Vec<NonPacked>`
note: required because it appears within the type `Contract`
--> tests/ui/storage_item/fail/collections_only_packed_1.rs:10:8
|
......@@ -104,7 +104,7 @@ error[E0277]: the trait bound `[NonPacked]: Encode` is not satisfied
= note: required because of the requirements on the impl of `Encode` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `Packed` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `StorableHint<()>` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032_u32>>` for `Vec<NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032>>` for `Vec<NonPacked>`
note: required because it appears within the type `Contract`
--> tests/ui/storage_item/fail/collections_only_packed_1.rs:10:8
|
......
......@@ -7,7 +7,7 @@ error[E0277]: the trait bound `BTreeMap<u128, NonPacked>: parity_scale_codec::De
= help: the trait `parity_scale_codec::Decode` is implemented for `BTreeMap<K, V>`
= note: required because of the requirements on the impl of `Packed` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `StorableHint<()>` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032_u32>>` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032>>` for `BTreeMap<u128, NonPacked>`
error[E0277]: the trait bound `BTreeMap<u128, NonPacked>: Encode` is not satisfied
--> tests/ui/storage_item/fail/collections_only_packed_2.rs:11:8
......@@ -18,7 +18,7 @@ error[E0277]: the trait bound `BTreeMap<u128, NonPacked>: Encode` is not satisfi
= help: the trait `Encode` is implemented for `BTreeMap<K, V>`
= note: required because of the requirements on the impl of `Packed` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `StorableHint<()>` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032_u32>>` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032>>` for `BTreeMap<u128, NonPacked>`
error[E0277]: the trait bound `BTreeMap<u128, NonPacked>: parity_scale_codec::Decode` is not satisfied
--> tests/ui/storage_item/fail/collections_only_packed_2.rs:9:1
......@@ -29,7 +29,7 @@ error[E0277]: the trait bound `BTreeMap<u128, NonPacked>: parity_scale_codec::De
= help: the trait `parity_scale_codec::Decode` is implemented for `BTreeMap<K, V>`
= note: required because of the requirements on the impl of `Packed` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `StorableHint<()>` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032_u32>>` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032>>` for `BTreeMap<u128, NonPacked>`
note: required because it appears within the type `Contract`
--> tests/ui/storage_item/fail/collections_only_packed_2.rs:10:8
|
......@@ -51,7 +51,7 @@ error[E0277]: the trait bound `BTreeMap<u128, NonPacked>: Encode` is not satisfi
= help: the trait `Encode` is implemented for `BTreeMap<K, V>`
= note: required because of the requirements on the impl of `Packed` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `StorableHint<()>` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032_u32>>` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032>>` for `BTreeMap<u128, NonPacked>`
note: required because it appears within the type `Contract`
--> tests/ui/storage_item/fail/collections_only_packed_2.rs:10:8
|
......@@ -73,7 +73,7 @@ error[E0277]: the trait bound `BTreeMap<u128, NonPacked>: parity_scale_codec::De
= help: the trait `parity_scale_codec::Decode` is implemented for `BTreeMap<K, V>`
= note: required because of the requirements on the impl of `Packed` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `StorableHint<()>` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032_u32>>` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032>>` for `BTreeMap<u128, NonPacked>`
note: required because it appears within the type `Contract`
--> tests/ui/storage_item/fail/collections_only_packed_2.rs:10:8
|
......@@ -95,7 +95,7 @@ error[E0277]: the trait bound `BTreeMap<u128, NonPacked>: Encode` is not satisfi
= help: the trait `Encode` is implemented for `BTreeMap<K, V>`
= note: required because of the requirements on the impl of `Packed` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `StorableHint<()>` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032_u32>>` for `BTreeMap<u128, NonPacked>`
= note: required because of the requirements on the impl of `AutoStorableHint<ManualKey<453539032>>` for `BTreeMap<u128, NonPacked>`
note: required because it appears within the type `Contract`
--> tests/ui/storage_item/fail/collections_only_packed_2.rs:10:8
|
......
......@@ -25,7 +25,7 @@ error[E0599]: the method `fire` exists for struct `CallBuilder<E, Set<Call<E>>,
--> tests/ui/trait_def/fail/message_output_non_codec.rs:5:5
|
1 | pub struct NonCodec;
| -------------------- doesn't satisfy `NonCodec: parity_scale_codec::Decode`
| ------------------- doesn't satisfy `NonCodec: parity_scale_codec::Decode`
...
5 | #[ink(message)]
| ^ method cannot be called on `CallBuilder<E, Set<Call<E>>, Set<ExecutionInput<ArgumentList<ArgumentListEnd, ArgumentListEnd>>>, Set<ReturnType<NonCodec>>>` due to unsatisfied trait bounds
......@@ -35,11 +35,5 @@ error[E0599]: the method `fire` exists for struct `CallBuilder<E, Set<Call<E>>,
note: the following trait must be implemented
--> $CARGO/parity-scale-codec-3.2.1/src/codec.rs
|
| / pub trait Decode: Sized {
| | // !INTERNAL USE ONLY!
| | // This const helps SCALE to optimize the encoding/decoding by doing fake specialization.
| | #[doc(hidden)]
... |
| | }
| | }
| |_^
| pub trait Decode: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment