Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
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
|
Expand All @@ -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`
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
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
Expand Down
20 changes: 10 additions & 10 deletions crates/ink/tests/ui/contract/fail/event-too-many-topics.stderr
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
| ^^^^^^^^^^^^^
Expand All @@ -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) {}
| ^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
| ^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -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>`
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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) {}
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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) {}
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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) {}
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
|
Expand All @@ -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
|
Expand All @@ -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
|
Expand All @@ -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
|
Expand Down
Loading