-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
197 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 8 additions & 4 deletions
12
crates/lang/tests/ui/contract/fail/constructor-multiple-wildcard-selectors.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:15:9 | ||
| | ||
15 | pub fn constructor2() -> Self { | ||
| ^^^ | ||
15 | / pub fn constructor2() -> Self { | ||
16 | | Self {} | ||
17 | | } | ||
| |_________^ | ||
|
||
error: first ink! constructor with overlapping wildcard selector here | ||
--> tests/ui/contract/fail/constructor-multiple-wildcard-selectors.rs:10:9 | ||
| | ||
10 | pub fn constructor1() -> Self { | ||
| ^^^ | ||
10 | / pub fn constructor1() -> Self { | ||
11 | | Self {} | ||
12 | | } | ||
| |_________^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 8 additions & 25 deletions
33
crates/lang/tests/ui/contract/fail/constructor-self-receiver-03.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,18 @@ | ||
error[E0637]: `&` without an explicit lifetime name cannot be used here | ||
--> tests/ui/contract/fail/constructor-self-receiver-03.rs:10:34 | ||
| | ||
10 | 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:10:35 | ||
| | ||
6 | pub struct Contract {} | ||
| --- `Self` not allowed in a constant item | ||
... | ||
10 | pub fn constructor(this: &Self) -> Self { | ||
| ^^^^ `Self` is only available in impls, traits, and type definitions | ||
|
||
error[E0411]: cannot find type `Self` in this scope | ||
--> tests/ui/contract/fail/constructor-self-receiver-03.rs:10:35 | ||
error[E0106]: missing lifetime specifier | ||
--> tests/ui/contract/fail/constructor-self-receiver-03.rs:10:34 | ||
| | ||
3 | #[ink::contract] | ||
| ---------------- `Self` not allowed in a function | ||
... | ||
10 | pub fn constructor(this: &Self) -> Self { | ||
| ^^^^ `Self` is only available in impls, traits, and type definitions | ||
|
||
error[E0277]: the trait bound `&'static Contract: WrapperTypeDecode` is not satisfied | ||
--> tests/ui/contract/fail/constructor-self-receiver-03.rs:10:9 | ||
| ^ expected named lifetime parameter | ||
| | ||
10 | pub fn constructor(this: &Self) -> Self { | ||
| ^^^ the trait `WrapperTypeDecode` is not implemented for `&'static Contract` | ||
help: consider introducing a named lifetime parameter | ||
| | ||
10 ~ pub fn constructor(this: &'a Self) -> Self { | ||
11 | Self {} | ||
12 ~ }<'a> | ||
| | ||
= 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` |
28 changes: 17 additions & 11 deletions
28
crates/lang/tests/ui/contract/fail/event-too-many-topics-anonymous.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 17 additions & 11 deletions
28
crates/lang/tests/ui/contract/fail/event-too-many-topics.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
crates/lang/tests/ui/contract/fail/message-self-receiver-missing.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:14:9 | ||
| | ||
14 | #[ink(message)] | ||
| ^ | ||
14 | / #[ink(message)] | ||
15 | | pub fn message() {} | ||
| |___________________________^ |
14 changes: 10 additions & 4 deletions
14
crates/lang/tests/ui/contract/fail/module-missing-constructor.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:4:1 | ||
| | ||
4 | mod contract { | ||
| ^^^ | ||
--> tests/ui/contract/fail/module-missing-constructor.rs:4:1 | ||
| | ||
4 | / mod contract { | ||
5 | | #[ink(storage)] | ||
6 | | pub struct Contract {} | ||
7 | | | ||
... | | ||
11 | | } | ||
12 | | } | ||
| |_^ |
14 changes: 10 additions & 4 deletions
14
crates/lang/tests/ui/contract/fail/module-missing-message.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:4:1 | ||
| | ||
4 | mod contract { | ||
| ^^^ | ||
--> tests/ui/contract/fail/module-missing-message.rs:4:1 | ||
| | ||
4 | / mod contract { | ||
5 | | #[ink(storage)] | ||
6 | | pub struct Contract {} | ||
7 | | | ||
... | | ||
13 | | } | ||
14 | | } | ||
| |_^ |
Oops, something went wrong.