Upgrade all crates to the Rust 2021 edition (#3991)

* Upgrade all crates to the Rust 2021 edition

I've personally started using the new format strings for things like
`panic!("some message {foo}")` or similar and have been upgrading crates
on a case-by-case basis, but I think it probably makes more sense to go
ahead and blanket upgrade everything so 2021 features are always
available.

* Fix compile of the C API

* Fix a warning

* Fix another warning
This commit is contained in:
Alex Crichton
2022-04-04 12:27:12 -05:00
committed by GitHub
parent f18dbe49c9
commit 7b5176baea
59 changed files with 60 additions and 58 deletions

View File

@@ -7,7 +7,7 @@ license = "Apache-2.0 WITH LLVM-exception"
documentation = "https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/docs/index.md"
repository = "https://github.com/bytecodealliance/wasmtime"
publish = false
edition = "2018"
edition = "2021"
[[bin]]
name = "clif-util"

View File

@@ -9,7 +9,7 @@ repository = "https://github.com/bytecodealliance/wasmtime"
categories = ["no-std"]
readme = "README.md"
keywords = ["btree", "forest", "set", "map"]
edition = "2018"
edition = "2021"
[dependencies]
cranelift-entity = { path = "../entity", version = "0.83.0", default-features = false }

View File

@@ -10,7 +10,7 @@ categories = ["no-std"]
readme = "README.md"
keywords = ["compile", "compiler", "jit"]
build = "build.rs"
edition = "2018"
edition = "2021"
[dependencies]
cranelift-codegen-shared = { path = "./shared", version = "0.83.0" }

View File

@@ -6,7 +6,7 @@ description = "Metaprogram for cranelift-codegen code generator library"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition = "2018"
edition = "2021"
# FIXME(rust-lang/cargo#9300): uncomment once that lands
# [package.metadata.docs.rs]

View File

@@ -6,7 +6,7 @@ description = "For code shared between cranelift-codegen-meta and cranelift-code
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition = "2018"
edition = "2021"
[dependencies]
# Since this is a shared dependency of several packages, please strive to keep this dependency-free

View File

@@ -9,7 +9,7 @@ repository = "https://github.com/bytecodealliance/wasmtime"
categories = ["no-std"]
readme = "README.md"
keywords = ["entity", "set", "map"]
edition = "2018"
edition = "2021"
[dependencies]
serde = { version = "1.0.94", features = ["derive"], optional = true }

View File

@@ -7,7 +7,7 @@ license = "Apache-2.0 WITH LLVM-exception"
documentation = "https://docs.rs/cranelift-filetests"
repository = "https://github.com/bytecodealliance/wasmtime"
publish = false
edition = "2018"
edition = "2021"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.83.0", features = ["testing_hooks"] }

View File

@@ -8,7 +8,7 @@ documentation = "https://docs.rs/cranelift-frontend"
categories = ["no-std"]
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition = "2018"
edition = "2021"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.83.0", default-features = false }

View File

@@ -6,7 +6,7 @@ description = "Cranelift module generator"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition = "2018"
edition = "2021"
publish = false

View File

@@ -8,7 +8,7 @@ documentation = "https://docs.rs/cranelift-interpreter"
categories = ["no-std"]
license = "Apache-2.0 WITH LLVM-exception"
readme = "README.md"
edition = "2018"
edition = "2021"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.83.0" }

View File

@@ -3,7 +3,7 @@ name = "isle-fuzz"
version = "0.0.0"
authors = ["Automatically generated"]
publish = false
edition = "2018"
edition = "2021"
[package.metadata]
cargo-fuzz = true

View File

@@ -1,7 +1,7 @@
[package]
authors = ["The Cranelift Project Developers"]
description = "ISLE: Instruction Selection and Lowering Expressions. A domain-specific language for instruction selection in Cranelift."
edition = "2018"
edition = "2021"
license = "Apache-2.0 WITH LLVM-exception"
name = "cranelift-isle"
readme = "../README.md"

View File

@@ -2,7 +2,7 @@
name = "islec"
version = "0.1.0"
authors = ["The Cranelift Project Developers"]
edition = "2018"
edition = "2021"
license = "Apache-2.0 WITH LLVM-exception"
publish = false

View File

@@ -7,7 +7,7 @@ repository = "https://github.com/bytecodealliance/wasmtime"
documentation = "https://docs.rs/cranelift-jit"
license = "Apache-2.0 WITH LLVM-exception"
readme = "README.md"
edition = "2018"
edition = "2021"
[dependencies]
cranelift-module = { path = "../module", version = "0.83.0" }

View File

@@ -8,7 +8,7 @@ documentation = "https://docs.rs/cranelift-module"
categories = ["no-std"]
license = "Apache-2.0 WITH LLVM-exception"
readme = "README.md"
edition = "2018"
edition = "2021"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.83.0", default-features = false }

View File

@@ -8,7 +8,7 @@ repository = "https://github.com/bytecodealliance/wasmtime"
categories = ["no-std"]
license = "Apache-2.0 WITH LLVM-exception"
readme = "README.md"
edition = "2018"
edition = "2021"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.83.0", default-features = false }

View File

@@ -7,7 +7,7 @@ repository = "https://github.com/bytecodealliance/wasmtime"
documentation = "https://docs.rs/cranelift-object"
license = "Apache-2.0 WITH LLVM-exception"
readme = "README.md"
edition = "2018"
edition = "2021"
[dependencies]
cranelift-module = { path = "../module", version = "0.83.0" }

View File

@@ -9,7 +9,7 @@ repository = "https://github.com/bytecodealliance/wasmtime"
categories = ["no-std"]
readme = "README.md"
keywords = ["optimize", "compile", "compiler", "jit"]
edition = "2018"
edition = "2021"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.83.0", default-features = false }

View File

@@ -7,7 +7,7 @@ license = "Apache-2.0 WITH LLVM-exception"
documentation = "https://docs.rs/cranelift-reader"
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition = "2018"
edition = "2021"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.83.0" }

View File

@@ -7,7 +7,7 @@ repository = "https://github.com/bytecodealliance/wasmtime"
license = "Apache-2.0 WITH LLVM-exception"
readme = "README.md"
keywords = ["webassembly", "serde"]
edition = "2018"
edition = "2021"
[[bin]]
name = "clif-json"

View File

@@ -9,7 +9,7 @@ repository = "https://github.com/bytecodealliance/wasmtime"
categories = ["no-std"]
readme = "README.md"
keywords = ["compile", "compiler", "jit"]
edition = "2018"
edition = "2021"
[dependencies]
cranelift-codegen = { path = "../codegen", version = "0.83.0", default-features = false }

View File

@@ -9,7 +9,7 @@ license = "Apache-2.0 WITH LLVM-exception"
categories = ["no-std", "wasm"]
readme = "README.md"
keywords = ["webassembly", "wasm"]
edition = "2018"
edition = "2021"
[dependencies]
wasmparser = { version = "0.83.0", default-features = false }