summaryrefslogtreecommitdiff
path: root/src/codegen/mod.rs
diff options
context:
space:
mode:
authorNick Fitzgerald <fitzgen@gmail.com>2017-04-06 15:21:33 -0700
committerNick Fitzgerald <fitzgen@gmail.com>2017-04-07 09:58:46 -0700
commit5004ed43b27d2ec7764829d937ea515f7bc796ba (patch)
treecbae0407e35466d67b9d93039189d839c8d9fed8 /src/codegen/mod.rs
parent88b7cd66a25ce69961940e6e2c12f616c67e08d3 (diff)
Define extra assertion macros
This commit defines a new set of assertion macros that are only checked in testing/CI when the `testing_only_extra_assertions` feature is enabled. This makes it so that *users* of bindgen that happen to be making a debug build don't enable all these extra and expensive assertions. Additionally, this removes the `testing_only_assert_no_dangling_items` feature, and runs the assertions that were previously gated on that feature when the new `testing_only_extra_assertions` feature is enabled.
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r--src/codegen/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs
index ee4a9d4e..5a89e5c8 100644
--- a/src/codegen/mod.rs
+++ b/src/codegen/mod.rs
@@ -2642,7 +2642,7 @@ impl TryToRustTy for TemplateInstantiation {
// This can happen if we generated an opaque type for a partial
// template specialization, and we've hit an instantiation of
// that partial specialization.
- debug_assert!(ctx.resolve_type_through_type_refs(decl)
+ extra_assert!(ctx.resolve_type_through_type_refs(decl)
.is_opaque());
return Err(error::Error::InstantiationOfOpaqueType);
}