From 14ce1a1db4056baca7c63d994accc9eb398bf6b3 Mon Sep 17 00:00:00 2001 From: Dan Shields <35669742+NukeManDan@users.noreply.github.com> Date: Sat, 13 Nov 2021 18:39:41 -0700 Subject: [PATCH 1/2] move to rust 2021 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index e1674a0d..00de856d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ name = "cargo-contract" version = "0.15.0" authors = ["Parity Technologies "] build = "build.rs" -edition = "2018" +edition = "2021" license = "GPL-3.0" readme = "README.md" -- GitLab From 7efbe4b9e03c01794c8a4d5407906092daf8e686 Mon Sep 17 00:00:00 2001 From: Dan Shields Date: Sat, 20 Nov 2021 21:16:32 -0700 Subject: [PATCH 2/2] rust 2021 MSRV 1.56.1 --- CHANGELOG.md | 1 + Cargo.toml | 1 + metadata/Cargo.toml | 3 ++- templates/new/_Cargo.toml | 4 ++-- templates/tools/generate-metadata/_Cargo.toml | 3 ++- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ac96a65..9163b256 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +- Migrated to 2021 edition, enforcing MSRV of `1.56.1`. [#360](https://github.com/paritytech/cargo-contract/pull/360) ### Changed - Use of `-Clinker-plugin-lto` flag(reduces the size of the contract) if `lto` is enabled - [#358](https://github.com/paritytech/cargo-contract/pull/358) diff --git a/Cargo.toml b/Cargo.toml index 00de856d..0556367b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ version = "0.15.0" authors = ["Parity Technologies "] build = "build.rs" edition = "2021" +rust-version = "1.56.1" license = "GPL-3.0" readme = "README.md" diff --git a/metadata/Cargo.toml b/metadata/Cargo.toml index 1e2126df..3f223029 100644 --- a/metadata/Cargo.toml +++ b/metadata/Cargo.toml @@ -2,7 +2,8 @@ name = "contract-metadata" version = "0.4.0" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" +rust-version = "1.56.1" license = "Apache-2.0" readme = "README.md" diff --git a/templates/new/_Cargo.toml b/templates/new/_Cargo.toml index 5999a163..cbdc141e 100644 --- a/templates/new/_Cargo.toml +++ b/templates/new/_Cargo.toml @@ -2,8 +2,8 @@ name = "{{name}}" version = "0.1.0" authors = ["[your_name] <[your_email]>"] -edition = "2018" -resolver = "2" +edition = "2021" +rust-version = "1.56.1" [dependencies] ink_primitives = { version = "3.0.0-rc6", default-features = false } diff --git a/templates/tools/generate-metadata/_Cargo.toml b/templates/tools/generate-metadata/_Cargo.toml index 952d352d..179262d0 100644 --- a/templates/tools/generate-metadata/_Cargo.toml +++ b/templates/tools/generate-metadata/_Cargo.toml @@ -2,7 +2,8 @@ name = "metadata-gen" version = "0.1.0" authors = ["Parity Technologies "] -edition = "2018" +edition = "2021" +rust-version = "1.56.1" publish = false [[bin]] -- GitLab