Skip to content
/ cxx Public
forked from dtolnay/cxx

Commit

Permalink
Update to 2021 edition
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 6, 2023
1 parent fb070e9 commit 6ccae07
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 22 deletions.
10 changes: 5 additions & 5 deletions BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rust_library(
doc_deps = [
":cxx-build",
],
edition = "2018",
edition = "2021",
features = [
"alloc",
"std",
Expand All @@ -28,7 +28,7 @@ rust_binary(
"gen/cmd/src/gen",
"gen/cmd/src/syntax",
],
edition = "2018",
edition = "2021",
deps = [
"//third-party:clap",
"//third-party:codespan-reporting",
Expand All @@ -53,7 +53,7 @@ rust_library(
name = "cxxbridge-macro",
srcs = glob(["macro/src/**/*.rs"]) + ["macro/src/syntax"],
doctests = False,
edition = "2018",
edition = "2021",
proc_macro = True,
deps = [
"//third-party:proc-macro2",
Expand All @@ -69,7 +69,7 @@ rust_library(
"gen/build/src/syntax",
],
doctests = False,
edition = "2018",
edition = "2021",
deps = [
"//third-party:cc",
"//third-party:codespan-reporting",
Expand All @@ -87,7 +87,7 @@ rust_library(
"gen/lib/src/gen",
"gen/lib/src/syntax",
],
edition = "2018",
edition = "2021",
visibility = ["PUBLIC"],
deps = [
"//third-party:cc",
Expand Down
10 changes: 5 additions & 5 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rust_library(
"alloc",
"std",
],
edition = "2018",
edition = "2021",
proc_macro_deps = [
":cxxbridge-macro",
],
Expand All @@ -26,7 +26,7 @@ rust_binary(
name = "cxxbridge",
srcs = glob(["gen/cmd/src/**/*.rs"]),
data = ["gen/cmd/src/gen/include/cxx.h"],
edition = "2018",
edition = "2021",
deps = [
"//third-party:clap",
"//third-party:codespan-reporting",
Expand All @@ -53,7 +53,7 @@ cc_library(
rust_proc_macro(
name = "cxxbridge-macro",
srcs = glob(["macro/src/**/*.rs"]),
edition = "2018",
edition = "2021",
deps = [
"//third-party:proc-macro2",
"//third-party:quote",
Expand All @@ -65,7 +65,7 @@ rust_library(
name = "cxx-build",
srcs = glob(["gen/build/src/**/*.rs"]),
data = ["gen/build/src/gen/include/cxx.h"],
edition = "2018",
edition = "2021",
deps = [
"//third-party:cc",
"//third-party:codespan-reporting",
Expand All @@ -81,7 +81,7 @@ rust_library(
name = "cxx-gen",
srcs = glob(["gen/lib/src/**/*.rs"]),
data = ["gen/lib/src/gen/include/cxx.h"],
edition = "2018",
edition = "2021",
visibility = ["//visibility:public"],
deps = [
"//third-party:cc",
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["David Tolnay <[email protected]>"]
categories = ["development-tools::ffi", "api-bindings", "no-std"]
description = "Safe interop between Rust and C++"
documentation = "https://docs.rs/cxx"
edition = "2018"
edition = "2021"
exclude = ["/demo", "/gen", "/syntax", "/third-party", "/tools/buck/prelude"]
homepage = "https://cxx.rs"
keywords = ["ffi", "c++"]
Expand Down
2 changes: 1 addition & 1 deletion book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ authors = ["David Tolnay"]
description = "CXX — safe interop between Rust and C++"

[rust]
edition = "2018"
edition = "2021"

[build]
build-dir = "build"
Expand Down
2 changes: 1 addition & 1 deletion flags/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "1.0.99"
authors = ["David Tolnay <[email protected]>"]
categories = ["development-tools::ffi", "compilers"]
description = "Compiler configuration of the `cxx` crate (implementation detail)"
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/dtolnay/cxx"
rust-version = "1.60"
Expand Down
2 changes: 1 addition & 1 deletion gen/build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["David Tolnay <[email protected]>"]
categories = ["development-tools::build-utils", "development-tools::ffi"]
description = "C++ code generator for integrating `cxx` crate into a Cargo build."
documentation = "https://docs.rs/cxx-build"
edition = "2018"
edition = "2021"
exclude = ["build.rs"]
homepage = "https://cxx.rs"
keywords = ["ffi", "build-dependencies"]
Expand Down
2 changes: 1 addition & 1 deletion gen/cmd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "1.0.99"
authors = ["David Tolnay <[email protected]>"]
categories = ["development-tools::build-utils", "development-tools::ffi"]
description = "C++ code generator for integrating `cxx` crate into a non-Cargo build."
edition = "2018"
edition = "2021"
exclude = ["build.rs"]
homepage = "https://cxx.rs"
keywords = ["ffi"]
Expand Down
2 changes: 1 addition & 1 deletion gen/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.7.99"
authors = ["Adrian Taylor <[email protected]>"]
categories = ["development-tools::ffi"]
description = "C++ code generator for integrating `cxx` crate into higher level tools."
edition = "2018"
edition = "2021"
exclude = ["build.rs"]
keywords = ["ffi"]
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "1.0.99"
authors = ["David Tolnay <[email protected]>"]
categories = ["development-tools::ffi"]
description = "Implementation detail of the `cxx` crate."
edition = "2018"
edition = "2021"
exclude = ["build.rs", "README.md"]
homepage = "https://cxx.rs"
keywords = ["ffi"]
Expand Down
4 changes: 2 additions & 2 deletions tests/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("//tools/buck:rust_cxx_bridge.bzl", "rust_cxx_bridge")
rust_test(
name = "test",
srcs = ["test.rs"],
edition = "2018",
edition = "2021",
deps = [
":ffi",
"//:cxx",
Expand All @@ -18,7 +18,7 @@ rust_library(
"ffi/module.rs",
],
crate = "cxx_test_suite",
edition = "2018",
edition = "2021",
deps = [
":impl",
"//:cxx",
Expand Down
4 changes: 2 additions & 2 deletions tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rust_test(
name = "test",
size = "small",
srcs = ["test.rs"],
edition = "2018",
edition = "2021",
deps = [
":cxx_test_suite",
"//:cxx",
Expand All @@ -20,7 +20,7 @@ rust_library(
"ffi/lib.rs",
"ffi/module.rs",
],
edition = "2018",
edition = "2021",
deps = [
":impl",
"//:cxx",
Expand Down
2 changes: 1 addition & 1 deletion tests/ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "cxx-test-suite"
version = "0.0.0"
authors = ["David Tolnay <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[lib]
Expand Down
1 change: 1 addition & 0 deletions third-party/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[package]
name = "third-party"
version = "0.0.0"
edition = "2021"
publish = false

[lib]
Expand Down

0 comments on commit 6ccae07

Please sign in to comment.