summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-01-27 11:04:55 -0800
committerGitHub <noreply@github.com>2017-01-27 11:04:55 -0800
commit7d995d75e07798c1527d5ea3dd8a647ed79fe209 (patch)
tree83e736e1e2f2d48aa8ce9807be05595546b4ad75
parent33df99a73784c1846b62f97ebff3848cdd76c3b1 (diff)
parentd4f772b83ab0ed5d957ab51dbd096dec1d88076d (diff)
Auto merge of #452 - emilio:dont-assert, r=fitzgenv0.20.5
Remove recently-added assertion that can legitimately trigger This fails under BaseErrorResult in Stylo builds. I have no idea right now why that isn't whitelisted (should be, given we're calling it from TErrorResult's code generation). Let's disable this pending further investigation since I don't have time to dig into it right now. r? @fitzgen
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--src/codegen/mod.rs7
3 files changed, 8 insertions, 3 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 007c6b14..47601996 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
[root]
name = "bindgen"
-version = "0.20.4"
+version = "0.20.5"
dependencies = [
"aster 0.38.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/Cargo.toml b/Cargo.toml
index cfb648b2..8ee91b04 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@ name = "bindgen"
readme = "README.md"
repository = "https://github.com/servo/rust-bindgen"
documentation = "https://docs.rs/bindgen"
-version = "0.20.4"
+version = "0.20.5"
build = "build.rs"
[badges]
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs
index db17a3d1..7af70e98 100644
--- a/src/codegen/mod.rs
+++ b/src/codegen/mod.rs
@@ -287,7 +287,12 @@ impl CodeGenerator for Item {
}
debug!("<Item as CodeGenerator>::codegen: self = {:?}", self);
- assert!(whitelisted_items.contains(&self.id()));
+ if !whitelisted_items.contains(&self.id()) {
+ // TODO(emilio, #453): Figure out what to do when this happens
+ // legitimately, we could track the opaque stuff and disable the
+ // assertion there I guess.
+ error!("Found non-whitelisted item in code generation: {:?}", self);
+ }
result.set_seen(self.id());