This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
- Loading branch information
Showing
6 changed files
with
39 additions
and
39 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
30 changes: 15 additions & 15 deletions
30
primitives/api/test/tests/ui/impl_incorrect_method_signature.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,35 @@ | ||
error[E0053]: method `test` has an incompatible type for trait | ||
--> tests/ui/impl_incorrect_method_signature.rs:16:17 | ||
--> tests/ui/impl_incorrect_method_signature.rs:15:17 | ||
| | ||
16 | fn test(data: String) {} | ||
15 | fn test(data: String) {} | ||
| ^^^^^^ | ||
| | | ||
| expected `u64`, found `std::string::String` | ||
| expected `u64`, found `String` | ||
| help: change the parameter type to match the trait: `u64` | ||
| | ||
note: type in trait | ||
--> tests/ui/impl_incorrect_method_signature.rs:10:17 | ||
--> tests/ui/impl_incorrect_method_signature.rs:9:17 | ||
| | ||
10 | fn test(data: u64); | ||
9 | fn test(data: u64); | ||
| ^^^ | ||
= note: expected signature `fn(u64)` | ||
found signature `fn(std::string::String)` | ||
found signature `fn(String)` | ||
|
||
error[E0308]: mismatched types | ||
--> tests/ui/impl_incorrect_method_signature.rs:16:11 | ||
--> tests/ui/impl_incorrect_method_signature.rs:15:11 | ||
| | ||
14 | / sp_api::impl_runtime_apis! { | ||
15 | | impl self::Api<Block> for Runtime { | ||
16 | | fn test(data: String) {} | ||
13 | / sp_api::impl_runtime_apis! { | ||
14 | | impl self::Api<Block> for Runtime { | ||
15 | | fn test(data: String) {} | ||
| | ^^^^ expected `u64`, found `String` | ||
17 | | } | ||
16 | | } | ||
... | | ||
29 | | } | ||
30 | | } | ||
25 | | } | ||
26 | | } | ||
| |_- arguments to this function are incorrect | ||
| | ||
note: associated function defined here | ||
--> tests/ui/impl_incorrect_method_signature.rs:10:6 | ||
--> tests/ui/impl_incorrect_method_signature.rs:9:6 | ||
| | ||
10 | fn test(data: u64); | ||
9 | fn test(data: u64); | ||
| ^^^^ |
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,8 +1,8 @@ | ||
error[E0405]: cannot find trait `ApiV4` in module `self::runtime_decl_for_api` | ||
--> tests/ui/impl_missing_version.rs:18:13 | ||
--> tests/ui/impl_missing_version.rs:17:13 | ||
| | ||
8 | pub trait Api { | ||
7 | pub trait Api { | ||
| ------------- similarly named trait `ApiV2` defined here | ||
... | ||
18 | impl self::Api<Block> for Runtime { | ||
17 | impl self::Api<Block> for Runtime { | ||
| ^^^ help: a trait with a similar name exists: `ApiV2` |
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,8 +1,8 @@ | ||
error[E0046]: not all trait items implemented, missing: `test3` | ||
--> tests/ui/missing_versioned_method.rs:18:2 | ||
--> tests/ui/missing_versioned_method.rs:17:2 | ||
| | ||
12 | fn test3(); | ||
11 | fn test3(); | ||
| ----------- `test3` from trait | ||
... | ||
18 | impl self::Api<Block> for Runtime { | ||
17 | impl self::Api<Block> for Runtime { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `test3` in implementation |
6 changes: 3 additions & 3 deletions
6
primitives/api/test/tests/ui/missing_versioned_method_multiple_vers.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,8 +1,8 @@ | ||
error[E0046]: not all trait items implemented, missing: `test3` | ||
--> tests/ui/missing_versioned_method_multiple_vers.rs:20:2 | ||
--> tests/ui/missing_versioned_method_multiple_vers.rs:19:2 | ||
| | ||
12 | fn test3(); | ||
11 | fn test3(); | ||
| ----------- `test3` from trait | ||
... | ||
20 | impl self::Api<Block> for Runtime { | ||
19 | impl self::Api<Block> for Runtime { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `test3` in implementation |
28 changes: 14 additions & 14 deletions
28
primitives/api/test/tests/ui/type_reference_in_impl_runtime_apis_call.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,39 +1,39 @@ | ||
error[E0053]: method `test` has an incompatible type for trait | ||
--> tests/ui/type_reference_in_impl_runtime_apis_call.rs:16:17 | ||
--> tests/ui/type_reference_in_impl_runtime_apis_call.rs:15:17 | ||
| | ||
16 | fn test(data: &u64) { | ||
15 | fn test(data: &u64) { | ||
| ^^^^ | ||
| | | ||
| expected `u64`, found `&u64` | ||
| help: change the parameter type to match the trait: `u64` | ||
| | ||
note: type in trait | ||
--> tests/ui/type_reference_in_impl_runtime_apis_call.rs:10:17 | ||
--> tests/ui/type_reference_in_impl_runtime_apis_call.rs:9:17 | ||
| | ||
10 | fn test(data: u64); | ||
9 | fn test(data: u64); | ||
| ^^^ | ||
= note: expected signature `fn(u64)` | ||
found signature `fn(&u64)` | ||
|
||
error[E0308]: mismatched types | ||
--> tests/ui/type_reference_in_impl_runtime_apis_call.rs:16:11 | ||
--> tests/ui/type_reference_in_impl_runtime_apis_call.rs:15:11 | ||
| | ||
14 | / sp_api::impl_runtime_apis! { | ||
15 | | impl self::Api<Block> for Runtime { | ||
16 | | fn test(data: &u64) { | ||
13 | / sp_api::impl_runtime_apis! { | ||
14 | | impl self::Api<Block> for Runtime { | ||
15 | | fn test(data: &u64) { | ||
| | ^^^^^^^ expected `u64`, found `&u64` | ||
17 | | unimplemented!() | ||
16 | | unimplemented!() | ||
... | | ||
31 | | } | ||
32 | | } | ||
27 | | } | ||
28 | | } | ||
| |_- arguments to this function are incorrect | ||
| | ||
note: associated function defined here | ||
--> tests/ui/type_reference_in_impl_runtime_apis_call.rs:10:6 | ||
--> tests/ui/type_reference_in_impl_runtime_apis_call.rs:9:6 | ||
| | ||
10 | fn test(data: u64); | ||
9 | fn test(data: u64); | ||
| ^^^^ | ||
help: consider removing the borrow | ||
| | ||
16 | fn test(data: &u64) { | ||
15 | fn test(data: &u64) { | ||
| |