Update the bitflags to 2.2.1. (#2512)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a916fb6..a611ea4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -183,6 +183,7 @@
properly generate module names and paths that include spaces by escaping
them. To make the escaping clear and consistent, backslashes are also
escaped.
+* Updated `bitflags` dependency to 2.2.1. This changes the API of `CodegenConfig`.
## Removed
diff --git a/Cargo.lock b/Cargo.lock
index f128b18..2bbb278 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -26,7 +26,7 @@
version = "0.65.1"
dependencies = [
"annotate-snippets",
- "bitflags",
+ "bitflags 2.2.1",
"cexpr",
"clang-sys",
"lazy_static",
@@ -82,6 +82,12 @@
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
+name = "bitflags"
+version = "2.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24a6904aef64d73cf10ab17ebace7befb918b82164785cb89907993be7f83813"
+
+[[package]]
name = "block"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -125,7 +131,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76"
dependencies = [
- "bitflags",
+ "bitflags 1.3.2",
"clap_derive",
"clap_lex",
"is-terminal",
@@ -497,7 +503,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
dependencies = [
- "bitflags",
+ "bitflags 1.3.2",
]
[[package]]
@@ -529,7 +535,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03"
dependencies = [
- "bitflags",
+ "bitflags 1.3.2",
"errno",
"io-lifetimes",
"libc",
diff --git a/bindgen/Cargo.toml b/bindgen/Cargo.toml
index 1647570..fd20049 100644
--- a/bindgen/Cargo.toml
+++ b/bindgen/Cargo.toml
@@ -25,7 +25,7 @@
path = "lib.rs"
[dependencies]
-bitflags = "1.0.3"
+bitflags = "2.2.1"
cexpr = "0.6"
clang-sys = { version = "1", features = ["clang_6_0"] }
lazycell = "1"
diff --git a/bindgen/codegen/mod.rs b/bindgen/codegen/mod.rs
index 16757dd..47f2319 100644
--- a/bindgen/codegen/mod.rs
+++ b/bindgen/codegen/mod.rs
@@ -126,6 +126,7 @@
}
bitflags! {
+ #[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
struct DerivableTraits: u16 {
const DEBUG = 1 << 0;
const DEFAULT = 1 << 1;
diff --git a/bindgen/lib.rs b/bindgen/lib.rs
index a52aa1e..e4b71b0 100644
--- a/bindgen/lib.rs
+++ b/bindgen/lib.rs
@@ -109,6 +109,7 @@
bitflags! {
/// A type used to indicate which kind of items we have to generate.
+ #[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct CodegenConfig: u32 {
/// Whether to generate functions.
const FUNCTIONS = 1 << 0;