Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fix ui tests for latest rust stable #6310

Merged
merged 1 commit into from
Jun 9, 2020
Merged
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
41 changes: 23 additions & 18 deletions primitives/api/test/tests/ui/mock_only_one_error_type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,26 @@ error: Error type can not change between runtime apis
| ^^^^

error[E0277]: the trait bound `u32: std::convert::From<std::string::String>` is not satisfied
--> $DIR/mock_only_one_error_type.rs:15:1
|
15 | / sp_api::mock_impl_runtime_apis! {
16 | | impl Api<Block> for MockApi {
17 | | type Error = u32;
18 | |
... |
26 | | }
27 | | }
| |_^ the trait `std::convert::From<std::string::String>` is not implemented for `u32`
|
= help: the following implementations were found:
<u32 as std::convert::From<bool>>
<u32 as std::convert::From<char>>
<u32 as std::convert::From<h2::frame::reason::Reason>>
<u32 as std::convert::From<h2::frame::reason::Reason>>
and 18 others
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
--> $DIR/mock_only_one_error_type.rs:15:1
|
15 | / sp_api::mock_impl_runtime_apis! {
16 | | impl Api<Block> for MockApi {
17 | | type Error = u32;
18 | |
... |
26 | | }
27 | | }
| |_^ the trait `std::convert::From<std::string::String>` is not implemented for `u32`
|
::: $WORKSPACE/primitives/api/src/lib.rs:347:35
|
347 | type Error: std::fmt::Debug + From<String>;
| ------------ required by this bound in `sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ApiErrorExt`
|
= help: the following implementations were found:
<u32 as std::convert::From<bool>>
<u32 as std::convert::From<char>>
<u32 as std::convert::From<h2::frame::reason::Reason>>
<u32 as std::convert::From<h2::frame::reason::Reason>>
and 18 others
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)