From 82d32afde97429ce772573fd8d4465fb0855d11e Mon Sep 17 00:00:00 2001 From: Casper Meijn Date: Mon, 22 Apr 2024 16:51:33 +0200 Subject: [PATCH] chore: Update internal crates to Rust edition 2021 The published crates were already using edition 2021. Update all internal crates as well. Also add a new tests-2018 crate that runs all tests using edition 2018. --- conformance/Cargo.toml | 2 +- fuzz/Cargo.toml | 2 +- fuzz/afl/proto3/Cargo.toml | 2 +- protobuf/Cargo.toml | 2 +- tests-2018/Cargo.toml | 38 +++++++++++++++++++++++++++++++++ tests-no-std/Cargo.toml | 2 +- tests/Cargo.toml | 2 +- tests/single-include/Cargo.toml | 2 +- 8 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 tests-2018/Cargo.toml diff --git a/conformance/Cargo.toml b/conformance/Cargo.toml index 4bf97de0e..4ac16657e 100644 --- a/conformance/Cargo.toml +++ b/conformance/Cargo.toml @@ -6,7 +6,7 @@ authors = [ "Tokio Contributors ", ] publish = false -edition = "2018" +edition = "2021" [dependencies] bytes = "1" diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index faedb3a2d..c89c9a5ff 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -6,7 +6,7 @@ authors = [ "Tokio Contributors ", ] publish = false -edition = "2018" +edition = "2021" [package.metadata] cargo-fuzz = true diff --git a/fuzz/afl/proto3/Cargo.toml b/fuzz/afl/proto3/Cargo.toml index d1e00d5df..b5aabdffa 100644 --- a/fuzz/afl/proto3/Cargo.toml +++ b/fuzz/afl/proto3/Cargo.toml @@ -2,7 +2,7 @@ name = "fuzz-target-proto3" version = "0.1.0" authors = ["Prost developers"] -edition = "2018" +edition = "2021" [[bin]] name = "fuzz-target" diff --git a/protobuf/Cargo.toml b/protobuf/Cargo.toml index c2d4fd6c7..7474447f0 100644 --- a/protobuf/Cargo.toml +++ b/protobuf/Cargo.toml @@ -6,7 +6,7 @@ authors = [ "Tokio Contributors ", ] publish = false -edition = "2018" +edition = "2021" [dependencies] prost = { path = "../prost" } diff --git a/tests-2018/Cargo.toml b/tests-2018/Cargo.toml new file mode 100644 index 000000000..e4c87997f --- /dev/null +++ b/tests-2018/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "tests-2018" +version = "0.0.0" +authors = [ + "Dan Burkert ", + "Tokio Contributors ", +] +publish = false +edition = "2018" + +build = "../tests/src/build.rs" + +[lib] +doctest = false +path = "../tests/src/lib.rs" + +[features] +default = ["std"] +std = [] + +[dependencies] +anyhow = "1.0.1" +bytes = "1" +cfg-if = "1" +prost = { path = "../prost" } +prost-types = { path = "../prost-types" } +protobuf = { path = "../protobuf" } + +[dev-dependencies] +diff = "0.1" +prost-build = { path = "../prost-build", features = ["cleanup-markdown"] } +tempfile = "3" + +[build-dependencies] +cfg-if = "1" +env_logger = { version = "0.10", default-features = false } +prost-build = { path = "../prost-build" } +protobuf = { path = "../protobuf" } diff --git a/tests-no-std/Cargo.toml b/tests-no-std/Cargo.toml index aeb1626ca..6a288aa05 100644 --- a/tests-no-std/Cargo.toml +++ b/tests-no-std/Cargo.toml @@ -6,7 +6,7 @@ authors = [ "Tokio Contributors ", ] publish = false -edition = "2018" +edition = "2021" build = "../tests/src/build.rs" diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 3735ee660..c186f29cd 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -6,7 +6,7 @@ authors = [ "Tokio Contributors ", ] publish = false -edition = "2018" +edition = "2021" build = "src/build.rs" diff --git a/tests/single-include/Cargo.toml b/tests/single-include/Cargo.toml index 63a9b86cb..54408a0f1 100644 --- a/tests/single-include/Cargo.toml +++ b/tests/single-include/Cargo.toml @@ -2,7 +2,7 @@ name = "single_include" version = "0.1.0" authors = ["Cameron Dart "] -edition = "2018" +edition = "2021" publish = false license = "MIT"