Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Cargo.lock and fix ui tests #2040

Merged
merged 3 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
539 changes: 263 additions & 276 deletions Cargo.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait bound `NonCodecType: WrapperTypeDecode` is not satisfied
--> tests/ui/contract/fail/constructor-input-non-codec.rs:11:28
|
11 | pub fn constructor(_input: NonCodecType) -> Self {
| ^^^^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
| ^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
|
= help: the following other types implement trait `WrapperTypeDecode`:
Box<T>
Expand All @@ -21,8 +21,10 @@ note: required by a bound in `DispatchInput`
error[E0277]: the trait bound `NonCodecType: WrapperTypeDecode` is not satisfied
--> tests/ui/contract/fail/constructor-input-non-codec.rs:11:9
|
11 | pub fn constructor(_input: NonCodecType) -> Self {
| ^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
11 | / pub fn constructor(_input: NonCodecType) -> Self {
12 | | Self {}
13 | | }
| |_________^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
|
= help: the following other types implement trait `WrapperTypeDecode`:
Box<T>
Expand All @@ -33,11 +35,13 @@ error[E0277]: the trait bound `NonCodecType: WrapperTypeDecode` is not satisfied
error[E0277]: the trait bound `NonCodecType: WrapperTypeEncode` is not satisfied
--> tests/ui/contract/fail/constructor-input-non-codec.rs:1:1
|
1 | #[ink::contract]
| ^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `NonCodecType`
1 | #[ink::contract]
| ^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `NonCodecType`
...
11 | pub fn constructor(_input: NonCodecType) -> Self {
| --- required by a bound introduced by this call
11 | / pub fn constructor(_input: NonCodecType) -> Self {
12 | | Self {}
13 | | }
| |_________- required by a bound introduced by this call
|
= help: the following other types implement trait `WrapperTypeEncode`:
Box<T>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
error: encountered ink! constructor with overlapping wildcard selectors
--> tests/ui/contract/fail/constructor-multiple-wildcard-selectors.rs:13:9
|
13 | pub fn constructor2() -> Self {
| ^^^
13 | / pub fn constructor2() -> Self {
14 | | Self {}
15 | | }
| |_________^

error: first ink! constructor with overlapping wildcard selector here
--> tests/ui/contract/fail/constructor-multiple-wildcard-selectors.rs:8:9
|
8 | pub fn constructor1() -> Self {
| ^^^
--> tests/ui/contract/fail/constructor-multiple-wildcard-selectors.rs:8:9
|
8 | / pub fn constructor1() -> Self {
9 | | Self {}
10 | | }
| |_________^
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
error[E0277]: the trait bound `ConstructorOutputValue<Result<u8, contract::Error>>: ConstructorOutput<Contract>` is not satisfied
--> tests/ui/contract/fail/constructor-return-result-invalid.rs:14:9
|
14 | pub fn constructor() -> Result<u8, Error> {
| ^^^ the trait `ConstructorOutput<Contract>` is not implemented for `ConstructorOutputValue<Result<u8, contract::Error>>`
14 | / pub fn constructor() -> Result<u8, Error> {
15 | | Ok(5_u8)
16 | | }
| |_________^ the trait `ConstructorOutput<Contract>` is not implemented for `ConstructorOutputValue<Result<u8, contract::Error>>`
|
= help: the following other types implement trait `ConstructorOutput<C>`:
ConstructorOutputValue<Result<C, E>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
error[E0277]: the trait bound `Result<Result<(), &contract::Error>, LangError>: Encode` is not satisfied
--> tests/ui/contract/fail/constructor-return-result-non-codec-error.rs:13:9
|
13 | pub fn constructor() -> Result<Self, Error> {
| ^^^ the trait `Encode` is not implemented for `Result<Result<(), &contract::Error>, LangError>`
13 | / pub fn constructor() -> Result<Self, Error> {
14 | | Ok(Self {})
15 | | }
| |_________^ the trait `Encode` is not implemented for `Result<Result<(), &contract::Error>, LangError>`
|
= help: the trait `Encode` is implemented for `Result<T, E>`
note: required by a bound in `return_value`
Expand All @@ -17,10 +19,13 @@ note: required by a bound in `return_value`
error[E0277]: the trait bound `contract::Error: WrapperTypeDecode` is not satisfied
--> tests/ui/contract/fail/constructor-return-result-non-codec-error.rs:13:33
|
13 | pub fn constructor() -> Result<Self, Error> {
| --- ^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `contract::Error`
| |
| required by a bound introduced by this call
13 | pub fn constructor() -> Result<Self, Error> {
| - ^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `contract::Error`
| _________|
| |
14 | | Ok(Self {})
15 | | }
| |_________- required by a bound introduced by this call
|
= help: the following other types implement trait `WrapperTypeDecode`:
Box<T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ error: encountered ink! attribute arguments with equal kinds
--> tests/ui/contract/fail/constructor-selector-and-wildcard-selector.rs:7:51
|
7 | #[ink(constructor, selector = 0xCAFEBABA, selector = _)]
| ^^^^^^^^
| ^^^^^^^^^^^^

error: first equal ink! attribute argument with equal kind here
--> tests/ui/contract/fail/constructor-selector-and-wildcard-selector.rs:7:28
|
7 | #[ink(constructor, selector = 0xCAFEBABA, selector = _)]
| ^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ error[E0411]: cannot find type `Self` in this scope
--> tests/ui/contract/fail/constructor-self-receiver-03.rs:8:35
|
4 | pub struct Contract {}
| --- `Self` not allowed in a constant item
| ---------------------- `Self` not allowed in a constant item
...
8 | pub fn constructor(this: &Self) -> Self {
| ^^^^ `Self` is only available in impls, traits, and type definitions
Expand All @@ -23,13 +23,15 @@ error[E0411]: cannot find type `Self` in this scope
| ^^^^ `Self` is only available in impls, traits, and type definitions

error[E0277]: the trait bound `&Contract: WrapperTypeDecode` is not satisfied
--> tests/ui/contract/fail/constructor-self-receiver-03.rs:8:9
|
8 | pub fn constructor(this: &Self) -> Self {
| ^^^ the trait `WrapperTypeDecode` is not implemented for `&Contract`
|
= help: the following other types implement trait `WrapperTypeDecode`:
Box<T>
Rc<T>
Arc<T>
= note: required for `&Contract` to implement `ink::parity_scale_codec::Decode`
--> tests/ui/contract/fail/constructor-self-receiver-03.rs:8:9
|
8 | / pub fn constructor(this: &Self) -> Self {
9 | | Self {}
10 | | }
| |_________^ the trait `WrapperTypeDecode` is not implemented for `&Contract`
|
= help: the following other types implement trait `WrapperTypeDecode`:
Box<T>
Rc<T>
Arc<T>
= note: required for `&Contract` to implement `ink::parity_scale_codec::Decode`
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 struct
5 | |
Expand All @@ -30,7 +30,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 struct
5 | |
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 struct
| ------------------- 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 @@ -5,4 +5,4 @@ error[E0592]: duplicate definitions with name `try_message`
| ---------------- other definition for `try_message`
...
16 | pub fn try_message(&self) {}
| ^^^ duplicate definitions for `try_message`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `try_message`
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait bound `NonCodecType: WrapperTypeDecode` is not satisfied
--> tests/ui/contract/fail/message-input-non-codec.rs:16:31
|
16 | pub fn message(&self, _input: NonCodecType) {}
| ^^^^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
| ^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
|
= help: the following other types implement trait `WrapperTypeDecode`:
Box<T>
Expand All @@ -22,7 +22,7 @@ error[E0277]: the trait bound `NonCodecType: WrapperTypeDecode` is not satisfied
--> tests/ui/contract/fail/message-input-non-codec.rs:16:9
|
16 | pub fn message(&self, _input: NonCodecType) {}
| ^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
|
= help: the following other types implement trait `WrapperTypeDecode`:
Box<T>
Expand All @@ -37,7 +37,7 @@ error[E0277]: the trait bound `NonCodecType: WrapperTypeEncode` is not satisfied
| ^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `NonCodecType`
...
16 | pub fn message(&self, _input: NonCodecType) {}
| --- required by a bound introduced by this call
| ---------------------------------------------- required by a bound introduced by this call
|
= help: the following other types implement trait `WrapperTypeEncode`:
Box<T>
Expand All @@ -63,7 +63,7 @@ error[E0599]: the method `try_invoke` exists for struct `CallBuilder<DefaultEnvi
--> tests/ui/contract/fail/message-input-non-codec.rs:16:9
|
16 | pub fn message(&self, _input: NonCodecType) {}
| ^^^ method cannot be called due to unsatisfied trait bounds
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
|
::: $WORKSPACE/crates/env/src/call/execution_input.rs
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ error: encountered ink! messages with overlapping wildcard selectors
--> tests/ui/contract/fail/message-multiple-wildcard-selectors.rs:16:9
|
16 | pub fn message2(&self) {}
| ^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: first ink! message with overlapping wildcard selector here
--> tests/ui/contract/fail/message-multiple-wildcard-selectors.rs:13:9
|
13 | pub fn message1(&self) {}
| ^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ note: required by a bound in `DispatchOutput`
error[E0277]: the trait bound `Result<NonCodecType, LangError>: Encode` is not satisfied
--> tests/ui/contract/fail/message-returns-non-codec.rs:16:9
|
16 | pub fn message(&self) -> NonCodecType {
| ^^^ the trait `Encode` is not implemented for `Result<NonCodecType, LangError>`
16 | / pub fn message(&self) -> NonCodecType {
17 | | NonCodecType
18 | | }
| |_________^ the trait `Encode` is not implemented for `Result<NonCodecType, LangError>`
|
= help: the trait `Encode` is implemented for `Result<T, E>`
note: required by a bound in `return_value`
Expand All @@ -43,11 +45,13 @@ note: required by a bound in `return_value`
error[E0599]: the method `try_invoke` exists for struct `CallBuilder<DefaultEnvironment, Set<Call<DefaultEnvironment>>, Set<ExecutionInput<...>>, ...>`, but its trait bounds were not satisfied
--> tests/ui/contract/fail/message-returns-non-codec.rs:16:9
|
4 | pub struct NonCodecType;
| ----------------------- doesn't satisfy `NonCodecType: ink::parity_scale_codec::Decode`
4 | pub struct NonCodecType;
| ----------------------- doesn't satisfy `NonCodecType: ink::parity_scale_codec::Decode`
...
16 | pub fn message(&self) -> NonCodecType {
| ^^^ method cannot be called due to unsatisfied trait bounds
16 | / pub fn message(&self) -> NonCodecType {
17 | | NonCodecType
18 | | }
| |_________^ method cannot be called due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`NonCodecType: ink::parity_scale_codec::Decode`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ error: encountered ink! attribute arguments with equal kinds
--> tests/ui/contract/fail/message-selector-and-wildcard-selector.rs:12:47
|
12 | #[ink(message, selector = 0xCAFEBABA, selector = _)]
| ^^^^^^^^
| ^^^^^^^^^^^^

error: first equal ink! attribute argument with equal kind here
--> tests/ui/contract/fail/message-selector-and-wildcard-selector.rs:12:24
|
12 | #[ink(message, selector = 0xCAFEBABA, selector = _)]
| ^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ error: ink! messages must have `&self` or `&mut self` receiver
--> tests/ui/contract/fail/message-self-receiver-invalid-01.rs:13:24
|
13 | pub fn message(this: &Self) {}
| ^^^^
| ^^^^^^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ error: ink! messages must have `&self` or `&mut self` receiver
--> tests/ui/contract/fail/message-self-receiver-invalid-02.rs:13:24
|
13 | pub fn message(this: &mut Self) {}
| ^^^^
| ^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
error: ink! messages must have `&self` or `&mut self` receiver
--> tests/ui/contract/fail/message-self-receiver-missing.rs:12:9
|
12 | #[ink(message)]
| ^
12 | / #[ink(message)]
13 | | pub fn message() {}
| |___________________________^
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
error: missing ink! constructor
--> tests/ui/contract/fail/module-missing-constructor.rs:2:1
|
2 | mod contract {
| ^^^
--> tests/ui/contract/fail/module-missing-constructor.rs:2:1
|
2 | / mod contract {
3 | | #[ink(storage)]
4 | | pub struct Contract {}
5 | |
... |
9 | | }
10 | | }
| |_^
14 changes: 10 additions & 4 deletions crates/ink/tests/ui/contract/fail/module-missing-message.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
error: missing ink! message
--> tests/ui/contract/fail/module-missing-message.rs:2:1
|
2 | mod contract {
| ^^^
--> tests/ui/contract/fail/module-missing-message.rs:2:1
|
2 | / mod contract {
3 | | #[ink(storage)]
4 | | pub struct Contract {}
5 | |
... |
11 | | }
12 | | }
| |_^
14 changes: 10 additions & 4 deletions crates/ink/tests/ui/contract/fail/module-missing-storage.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
error: missing ink! storage struct
--> tests/ui/contract/fail/module-missing-storage.rs:2:1
|
2 | mod contract {
| ^^^
--> tests/ui/contract/fail/module-missing-storage.rs:2:1
|
2 | / mod contract {
3 | | // #[ink(storage)]
4 | | pub struct Contract {}
5 | |
... |
12 | | }
13 | | }
| |_^
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
error: encountered multiple ink! storage structs, expected exactly one
--> tests/ui/contract/fail/module-multiple-storages.rs:2:1
|
2 | mod contract {
| ^^^
--> tests/ui/contract/fail/module-multiple-storages.rs:2:1
|
2 | / mod contract {
3 | | #[ink(storage)]
4 | | pub struct Contract {}
5 | |
... |
27 | | }
28 | | }
| |_^

error: ink! storage struct here
--> tests/ui/contract/fail/module-multiple-storages.rs:4:5
|
4 | pub struct Contract {}
| ^^^
| ^^^^^^^^^^^^^^^^^^^^^^

error: ink! storage struct here
--> tests/ui/contract/fail/module-multiple-storages.rs:17:5
|
17 | pub struct Contract2 {}
| ^^^
| ^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
error: namespace ink! property is not allowed on ink! trait implementation blocks
--> tests/ui/contract/fail/trait-impl-namespace-invalid.rs:21:5
|
21 | #[ink(namespace = "namespace")]
| ^
21 | / #[ink(namespace = "namespace")]
22 | | impl TraitDefinition for Contract {
23 | | #[ink(message)]
24 | | fn message(&self) {}
25 | | }
| |_____^
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-payable-mismatch.rs:23:9
|
23 | fn message(&self) {}
| ^^ expected `false`, found `true`
| ^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
|
= note: expected struct `TraitMessagePayable<false>`
found struct `TraitMessagePayable<true>`
Loading