@@ -5,21 +5,26 @@ error: Error type can not change between runtime apis
55 | ^^^^
66
77error[E0277]: the trait bound `u32: std::convert::From<std::string::String>` is not satisfied
8- --> $DIR/mock_only_one_error_type.rs:15:1
9- |
10- 15 | / sp_api::mock_impl_runtime_apis! {
11- 16 | | impl Api<Block> for MockApi {
12- 17 | | type Error = u32;
13- 18 | |
14- ... |
15- 26 | | }
16- 27 | | }
17- | |_^ the trait `std::convert::From<std::string::String>` is not implemented for `u32`
18- |
19- = help: the following implementations were found:
20- <u32 as std::convert::From<bool>>
21- <u32 as std::convert::From<char>>
22- <u32 as std::convert::From<h2::frame::reason::Reason>>
23- <u32 as std::convert::From<h2::frame::reason::Reason>>
24- and 18 others
25- = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
8+ --> $DIR/mock_only_one_error_type.rs:15:1
9+ |
10+ 15 | / sp_api::mock_impl_runtime_apis! {
11+ 16 | | impl Api<Block> for MockApi {
12+ 17 | | type Error = u32;
13+ 18 | |
14+ ... |
15+ 26 | | }
16+ 27 | | }
17+ | |_^ the trait `std::convert::From<std::string::String>` is not implemented for `u32`
18+ |
19+ ::: $WORKSPACE/primitives/api/src/lib.rs:347:35
20+ |
21+ 347 | type Error: std::fmt::Debug + From<String>;
22+ | ------------ required by this bound in `sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ApiErrorExt`
23+ |
24+ = help: the following implementations were found:
25+ <u32 as std::convert::From<bool>>
26+ <u32 as std::convert::From<char>>
27+ <u32 as std::convert::From<h2::frame::reason::Reason>>
28+ <u32 as std::convert::From<h2::frame::reason::Reason>>
29+ and 18 others
30+ = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
0 commit comments