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

Commit c59d75f

Browse files
committed
Fix UI tests and bump trybuild dep
See rust-lang/rust#73996 Backports: #7764 #7656
1 parent f78a414 commit c59d75f

File tree

9 files changed

+32
-32
lines changed

9 files changed

+32
-32
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frame/support/test/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "frame-support-test"
3-
version = "2.0.0"
3+
version = "2.0.1"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2018"
66
license = "Apache-2.0"
@@ -21,7 +21,7 @@ sp-inherents = { version = "2.0.0", default-features = false, path = "../../../p
2121
sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" }
2222
sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" }
2323
sp-std = { version = "2.0.0", default-features = false, path = "../../../primitives/std" }
24-
trybuild = "1.0.33"
24+
trybuild = "1.0.38"
2525
pretty_assertions = "0.6.1"
2626
rustversion = "1.0.0"
2727
frame-metadata = { version = "12.0.0", default-features = false, path = "../../metadata" }

primitives/api/test/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sp-api-test"
3-
version = "2.0.0"
3+
version = "2.0.1"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2018"
66
license = "Apache-2.0"
@@ -21,7 +21,7 @@ sp-consensus = { version = "0.8.0", path = "../../../primitives/consensus/common
2121
sc-block-builder = { version = "0.8.0", path = "../../../client/block-builder" }
2222
codec = { package = "parity-scale-codec", version = "1.3.1" }
2323
sp-state-machine = { version = "0.8.0", path = "../../../primitives/state-machine" }
24-
trybuild = "1.0.17"
24+
trybuild = "1.0.38"
2525
rustversion = "1.0.0"
2626

2727
[dev-dependencies]

primitives/api/test/tests/ui/impl_incorrect_method_signature.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
2323
17 | sp_api::impl_runtime_apis! {
2424
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found struct `std::string::String`
2525
|
26-
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<__SR_API_BLOCK__>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
27-
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<__SR_API_BLOCK__>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<std::string::String>, std::vec::Vec<_>) -> std::result::Result<_, _>`
26+
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> std::result::Result<_, _>`
27+
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<std::string::String>, Vec<_>) -> std::result::Result<_, _>`
2828
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
2929

3030
error[E0308]: mismatched types

primitives/api/test/tests/ui/mock_only_one_error_type.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: Error type can not change between runtime apis
44
23 | type Error = u64;
55
| ^^^^
66

7-
error[E0277]: the trait bound `u32: std::convert::From<std::string::String>` is not satisfied
7+
error[E0277]: the trait bound `u32: From<String>` is not satisfied
88
--> $DIR/mock_only_one_error_type.rs:15:1
99
|
1010
15 | / sp_api::mock_impl_runtime_apis! {
@@ -14,17 +14,17 @@ error[E0277]: the trait bound `u32: std::convert::From<std::string::String>` is
1414
... |
1515
26 | | }
1616
27 | | }
17-
| |_^ the trait `std::convert::From<std::string::String>` is not implemented for `u32`
18-
|
19-
::: $WORKSPACE/primitives/api/src/lib.rs:350:35
17+
| |_^ the trait `From<String>` is not implemented for `u32`
2018
|
21-
350 | type Error: std::fmt::Debug + From<String>;
22-
| ------------ required by this bound in `sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ApiErrorExt`
19+
::: $WORKSPACE/primitives/api/src/lib.rs
20+
|
21+
| type Error: std::fmt::Debug + From<String>;
22+
| ------------ required by this bound in `ApiErrorExt`
2323
|
2424
= 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>>
25+
<u32 as From<HttpError>>
26+
<u32 as From<HttpRequestId>>
27+
<u32 as From<HttpRequestStatus>>
28+
<u32 as From<Ipv4Addr>>
2929
and 18 others
3030
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

primitives/api/test/tests/ui/mock_only_self_reference.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
2424
12 | sp_api::mock_impl_runtime_apis! {
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `()`
2626
|
27-
= note: expected fn pointer `fn(&MockApi, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime_client::substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
28-
found fn pointer `fn(&MockApi, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime_client::substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<()>, std::vec::Vec<_>) -> std::result::Result<_, _>`
27+
= note: expected fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<u64>, Vec<_>) -> std::result::Result<_, _>`
28+
found fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<()>, Vec<_>) -> std::result::Result<_, _>`
2929
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
3030

3131
error[E0053]: method `Api_test2_runtime_api_impl` has an incompatible type for trait
@@ -42,6 +42,6 @@ error[E0053]: method `Api_test2_runtime_api_impl` has an incompatible type for t
4242
12 | sp_api::mock_impl_runtime_apis! {
4343
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `()`
4444
|
45-
= note: expected fn pointer `fn(&MockApi, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime_client::substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
46-
found fn pointer `fn(&MockApi, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, substrate_test_runtime_client::substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<()>, std::vec::Vec<_>) -> std::result::Result<_, _>`
45+
= note: expected fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<u64>, Vec<_>) -> std::result::Result<_, _>`
46+
found fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<()>, Vec<_>) -> std::result::Result<_, _>`
4747
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

primitives/api/test/tests/ui/type_reference_in_impl_runtime_apis_call.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
2323
17 | sp_api::impl_runtime_apis! {
2424
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `&u64`
2525
|
26-
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<__SR_API_BLOCK__>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
27-
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId<__SR_API_BLOCK__>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<&u64>, std::vec::Vec<_>) -> std::result::Result<_, _>`
26+
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> std::result::Result<_, _>`
27+
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<&u64>, Vec<_>) -> std::result::Result<_, _>`
2828
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
2929

3030
error[E0308]: mismatched types

primitives/runtime-interface/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sp-runtime-interface"
3-
version = "2.0.0"
3+
version = "2.0.1"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2018"
66
license = "Apache-2.0"
@@ -30,7 +30,7 @@ sp-state-machine = { version = "0.8.0", path = "../../primitives/state-machine"
3030
sp-core = { version = "2.0.0", path = "../core" }
3131
sp-io = { version = "2.0.0", path = "../io" }
3232
rustversion = "1.0.0"
33-
trybuild = "1.0.23"
33+
trybuild = "1.0.38"
3434

3535
[features]
3636
default = [ "std" ]

test-utils/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "substrate-test-utils"
3-
version = "2.0.0"
3+
version = "2.0.1"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2018"
66
license = "Apache-2.0"
@@ -18,4 +18,4 @@ tokio = { version = "0.2.13", features = ["macros"] }
1818

1919
[dev-dependencies]
2020
sc-service = { version = "0.8.0", path = "../client/service" }
21-
trybuild = { version = "1.0", features = ["diff"] }
21+
trybuild = { version = "1.0.38", features = [ "diff" ] }

0 commit comments

Comments
 (0)