Switch to Rust 2021 (#10170)

* Switch to Rust 2021

* Update trybuild to fix errors
This commit is contained in:
Bastian Köcher
2021-11-04 19:54:48 +01:00
committed by GitHub
parent 9fb9d7b8f0
commit b08d3017a8
245 changed files with 264 additions and 279 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-api"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-api-proc-macro"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -786,7 +786,7 @@ fn generate_runtime_info_impl(trait_: &ItemTrait, version: u64) -> TokenStream {
quote!(
#[cfg(any(feature = "std", test))]
impl < #( #impl_generics, )* > #crate_::RuntimeApiInfo
for #trait_name < #( #ty_generics, )* >
for dyn #trait_name < #( #ty_generics, )* >
{
#id
#version
-2
View File
@@ -644,8 +644,6 @@ pub const fn serialize_runtime_api_info(id: [u8; 8], version: u32) -> [u8; RUNTI
/// Deserialize the runtime API info serialized by [`serialize_runtime_api_info`].
pub fn deserialize_runtime_api_info(bytes: [u8; RUNTIME_API_INFO_SIZE]) -> ([u8; 8], u32) {
use sp_std::convert::TryInto;
let id: [u8; 8] = bytes[0..8]
.try_into()
.expect("the source slice size is equal to the dest array length; qed");
+2 -2
View File
@@ -2,7 +2,7 @@
name = "sp-api-test"
version = "2.0.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
publish = false
homepage = "https://substrate.io"
@@ -21,7 +21,7 @@ sp-consensus = { version = "0.10.0-dev", path = "../../consensus/common" }
sc-block-builder = { version = "0.10.0-dev", path = "../../../client/block-builder" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
sp-state-machine = { version = "0.10.0-dev", path = "../../state-machine" }
trybuild = "1.0.43"
trybuild = "1.0.52"
rustversion = "1.0.0"
[dev-dependencies]
@@ -2,7 +2,7 @@
name = "sp-application-crypto"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
description = "Provides facilities for generating application specific crypto wrapper types."
license = "Apache-2.0"
homepage = "https://substrate.io"
@@ -2,7 +2,7 @@
name = "sp-application-crypto-test"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
description = "Integration tests for application-crypto"
license = "Apache-2.0"
publish = false
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-arithmetic"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-arithmetic-fuzzer"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -3,7 +3,7 @@ name = "sp-authority-discovery"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Authority discovery primitives"
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -3,7 +3,7 @@ name = "sp-authorship"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Authorship primitives"
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "beefy-primitives"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
[dependencies]
@@ -2,7 +2,7 @@
name = "sp-block-builder"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-blockchain"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -3,7 +3,7 @@ name = "sp-consensus-aura"
version = "0.10.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Primitives for Aura consensus"
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -3,7 +3,7 @@ name = "sp-consensus-babe"
version = "0.10.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Primitives for BABE consensus"
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-consensus"
version = "0.10.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -3,7 +3,7 @@ name = "sp-consensus-pow"
version = "0.10.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Primitives for Aura consensus"
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -3,7 +3,7 @@ name = "sp-consensus-slots"
version = "0.10.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Primitives for slots-based consensus"
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -3,7 +3,7 @@ name = "sp-consensus-vrf"
version = "0.10.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Primitives for VRF based consensus"
edition = "2018"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/paritytech/substrate/"
homepage = "https://substrate.io"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-core"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-core-hashing"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-core-hashing-proc-macro"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-database"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-debug-derive"
version = "3.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -3,7 +3,7 @@ name = "sp-externalities"
version = "0.10.0-dev"
license = "Apache-2.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "Substrate externalities abstraction"
@@ -2,7 +2,7 @@
name = "sp-finality-grandpa"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -389,7 +389,6 @@ where
{
use sp_application_crypto::AppKey;
use sp_core::crypto::Public;
use sp_std::convert::TryInto;
let encoded = localized_payload(round, set_id, &message);
let signature = SyncCryptoStore::sign_with(
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-inherents"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-io"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-keyring"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-keystore"
version = "0.10.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-maybe-compressed-blob"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-npos-elections"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-npos-elections-fuzzer"
version = "2.0.0-alpha.5"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-npos-elections-solution-type"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -26,4 +26,4 @@ scale-info = "1.0"
sp-arithmetic = { path = "../../arithmetic", version = "4.0.0-dev" }
# used by generate_solution_type:
sp-npos-elections = { path = "..", version = "4.0.0-dev" }
trybuild = "1.0.43"
trybuild = "1.0.52"
+1 -1
View File
@@ -4,7 +4,7 @@ name = "sp-offchain"
version = "4.0.0-dev"
license = "Apache-2.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
readme = "README.md"
@@ -2,7 +2,7 @@
name = "sp-panic-handler"
version = "3.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-rpc"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-runtime-interface"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -31,7 +31,7 @@ sp-state-machine = { version = "0.10.0-dev", path = "../state-machine" }
sp-core = { version = "4.0.0-dev", path = "../core" }
sp-io = { version = "4.0.0-dev", path = "../io" }
rustversion = "1.0.0"
trybuild = "1.0.43"
trybuild = "1.0.52"
[features]
default = [ "std" ]
@@ -2,7 +2,7 @@
name = "sp-runtime-interface-proc-macro"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-runtime-interface-test-wasm-deprecated"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
build = "build.rs"
license = "Apache-2.0"
homepage = "https://substrate.io"
@@ -2,7 +2,7 @@
name = "sp-runtime-interface-test-wasm"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
build = "build.rs"
license = "Apache-2.0"
homepage = "https://substrate.io"
@@ -2,7 +2,7 @@
name = "sp-runtime-interface-test"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
publish = false
homepage = "https://substrate.io"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-runtime"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-sandbox"
version = "0.10.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-serializer"
version = "3.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-session"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-staking"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -3,7 +3,7 @@ name = "sp-state-machine"
version = "0.10.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Substrate State Machine"
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-std"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-storage"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
description = "Storage related primitives"
license = "Apache-2.0"
homepage = "https://substrate.io"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-tasks"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-test-primitives"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-timestamp"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -3,7 +3,7 @@ name = "sp-tracing"
version = "4.0.0-dev"
license = "Apache-2.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "Instrumentation primitives and macros for Substrate."
@@ -2,7 +2,7 @@
name = "sp-transaction-pool"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -3,7 +3,7 @@ name = "sp-transaction-storage-proof"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Transaction storage proof primitives"
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
+1 -1
View File
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
description = "Patricia trie stuff using a parity-scale-codec node format"
repository = "https://github.com/paritytech/substrate/"
license = "Apache-2.0"
edition = "2018"
edition = "2021"
homepage = "https://substrate.io"
documentation = "https://docs.rs/sp-trie"
readme = "README.md"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "sp-version"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-version-proc-macro"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
@@ -2,7 +2,7 @@
name = "sp-wasm-interface"
version = "4.0.0-dev"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"