diff --git a/core/sr-api-macros/tests/ui/empty_impl_runtime_apis_call.stderr b/core/sr-api-macros/tests/ui/empty_impl_runtime_apis_call.stderr index 61527a3480361..c714df5034cab 100644 --- a/core/sr-api-macros/tests/ui/empty_impl_runtime_apis_call.stderr +++ b/core/sr-api-macros/tests/ui/empty_impl_runtime_apis_call.stderr @@ -2,4 +2,4 @@ error: No api implementation given! --> $DIR/empty_impl_runtime_apis_call.rs:18:1 | 18 | impl_runtime_apis! {} - | ^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^ in this macro invocation diff --git a/core/sr-api-macros/tests/ui/impl_incorrect_method_signature.stderr b/core/sr-api-macros/tests/ui/impl_incorrect_method_signature.stderr index 025ca60c48095..81bbec8645ffd 100644 --- a/core/sr-api-macros/tests/ui/impl_incorrect_method_signature.stderr +++ b/core/sr-api-macros/tests/ui/impl_incorrect_method_signature.stderr @@ -21,7 +21,17 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr | |_- type in trait 17 | 18 | impl_runtime_apis! { - | ^^^^^^^^^^^^^^^^^^ expected u64, found struct `std::string::String` + | -^^^^^^^^^^^^^^^^^ + | | + | _expected u64, found struct `std::string::String` + | | +19 | | impl self::Api for Runtime { +20 | | fn test(data: String) {} +21 | | } +... | +33 | | } +34 | | } + | |_- in this macro invocation | = note: expected type `fn(&RuntimeApiImpl, &sr_primitives::generic::block::BlockId, substrate_test_runtime::Extrinsic>>, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api_client::runtime_api::ExecutionContext, std::option::Option, std::vec::Vec) -> std::result::Result, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api_client::error::Error>` found type `fn(&RuntimeApiImpl, &sr_primitives::generic::block::BlockId, substrate_test_runtime::Extrinsic>>, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api_client::runtime_api::ExecutionContext, std::option::Option, std::vec::Vec) -> std::result::Result, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api_client::error::Error>` @@ -36,7 +46,10 @@ error[E0308]: mismatched types ... | 33 | | } 34 | | } - | |_^ expected u64, found struct `std::string::String` + | | ^ + | | | + | |_expected u64, found struct `std::string::String` + | in this macro invocation | = note: expected type `u64` found type `std::string::String` diff --git a/core/sr-api-macros/tests/ui/invalid_api_version.stderr b/core/sr-api-macros/tests/ui/invalid_api_version.stderr index e7d6aa0ed133f..dcdbded81fe4b 100644 --- a/core/sr-api-macros/tests/ui/invalid_api_version.stderr +++ b/core/sr-api-macros/tests/ui/invalid_api_version.stderr @@ -7,7 +7,9 @@ error: can't qualify macro invocation with `pub` 6 | | fn test(data: u64); 7 | | } 8 | | } - | |_^ + | | ^ in this macro invocation + | |_| + | | = help: try adjusting the macro to put `pub` inside the invocation @@ -20,7 +22,9 @@ error: Unexpected `api_version` attribute. The supported format is `api_version( 6 | | fn test(data: u64); 7 | | } 8 | | } - | |_^ + | | ^ in this macro invocation + | |_| + | error: Unexpected `api_version` attribute. The supported format is `api_version(1)` --> $DIR/invalid_api_version.rs:4:4 diff --git a/core/sr-api-macros/tests/ui/invalid_api_version_2.stderr b/core/sr-api-macros/tests/ui/invalid_api_version_2.stderr index 3e46efb258052..39b73938dfac8 100644 --- a/core/sr-api-macros/tests/ui/invalid_api_version_2.stderr +++ b/core/sr-api-macros/tests/ui/invalid_api_version_2.stderr @@ -7,7 +7,9 @@ error: can't qualify macro invocation with `pub` 6 | | fn test(data: u64); 7 | | } 8 | | } - | |_^ + | | ^ in this macro invocation + | |_| + | | = help: try adjusting the macro to put `pub` inside the invocation @@ -20,7 +22,9 @@ error: Unexpected `api_version` attribute. The supported format is `api_version( 6 | | fn test(data: u64); 7 | | } 8 | | } - | |_^ + | | ^ in this macro invocation + | |_| + | error: Unexpected `api_version` attribute. The supported format is `api_version(1)` --> $DIR/invalid_api_version_2.rs:4:4 diff --git a/core/sr-api-macros/tests/ui/invalid_api_version_3.stderr b/core/sr-api-macros/tests/ui/invalid_api_version_3.stderr index 661221f28e892..d1694458f802e 100644 --- a/core/sr-api-macros/tests/ui/invalid_api_version_3.stderr +++ b/core/sr-api-macros/tests/ui/invalid_api_version_3.stderr @@ -7,7 +7,9 @@ error: can't qualify macro invocation with `pub` 6 | | fn test(data: u64); 7 | | } 8 | | } - | |_^ + | | ^ in this macro invocation + | |_| + | | = help: try adjusting the macro to put `pub` inside the invocation @@ -20,7 +22,9 @@ error: Unexpected `api_version` attribute. The supported format is `api_version( 6 | | fn test(data: u64); 7 | | } 8 | | } - | |_^ + | | ^ in this macro invocation + | |_| + | error: Unexpected `api_version` attribute. The supported format is `api_version(1)` --> $DIR/invalid_api_version_3.rs:4:4 diff --git a/core/sr-api-macros/tests/ui/type_reference_in_impl_runtime_apis_call.stderr b/core/sr-api-macros/tests/ui/type_reference_in_impl_runtime_apis_call.stderr index b2b024ee7fe1e..345389b275f04 100644 --- a/core/sr-api-macros/tests/ui/type_reference_in_impl_runtime_apis_call.stderr +++ b/core/sr-api-macros/tests/ui/type_reference_in_impl_runtime_apis_call.stderr @@ -21,7 +21,17 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr | |_- type in trait 17 | 18 | impl_runtime_apis! { - | ^^^^^^^^^^^^^^^^^^ expected u64, found &u64 + | -^^^^^^^^^^^^^^^^^ + | | + | _expected u64, found &u64 + | | +19 | | impl self::Api for Runtime { +20 | | fn test(data: &u64) { +21 | | unimplemented!() +... | +35 | | } +36 | | } + | |_- in this macro invocation | = note: expected type `fn(&RuntimeApiImpl, &sr_primitives::generic::block::BlockId, substrate_test_runtime::Extrinsic>>, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api_client::runtime_api::ExecutionContext, std::option::Option, std::vec::Vec) -> std::result::Result, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api_client::error::Error>` found type `fn(&RuntimeApiImpl, &sr_primitives::generic::block::BlockId, substrate_test_runtime::Extrinsic>>, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api_client::runtime_api::ExecutionContext, std::option::Option<&u64>, std::vec::Vec) -> std::result::Result, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api_client::error::Error>` @@ -36,7 +46,10 @@ error[E0308]: mismatched types ... | 35 | | } 36 | | } - | |_^ expected u64, found &u64 + | | ^ + | | | + | |_expected u64, found &u64 + | in this macro invocation | = note: expected type `u64` found type `&u64`