summaryrefslogtreecommitdiff
path: root/libbindgen/src
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-12-15 08:53:42 -0800
committerGitHub <noreply@github.com>2016-12-15 08:53:42 -0800
commit46b52e6e7f8c2cf62d529f38f1e0781cf3347da9 (patch)
tree6c872af0b8a1b5f659cfd5d4675a3c8c99f40cab /libbindgen/src
parent3289e9392eaad0a00bc180089a119976ad6c488f (diff)
parent15c687e0f1bec97448168f981ec93d207884a775 (diff)
Auto merge of #345 - fitzgen:use-feature-for-dangling-item-asserts, r=emilio
Use a feature to control dangling item assertions These checks are expensive enough that we only want to do them when hacking on bindgen itself, not anytime someone does a debug build of something that depends on bindgen. r? @emilio
Diffstat (limited to 'libbindgen/src')
-rw-r--r--libbindgen/src/ir/context.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbindgen/src/ir/context.rs b/libbindgen/src/ir/context.rs
index 4cf772dc..ba8ffe82 100644
--- a/libbindgen/src/ir/context.rs
+++ b/libbindgen/src/ir/context.rs
@@ -473,7 +473,7 @@ impl<'ctx> BindgenContext<'ctx> {
/// This function trying to find any dangling references inside of `items`
fn assert_no_dangling_references(&self) {
- if cfg!(debug_assertions) {
+ if cfg!(feature = "assert_no_dangling_items") {
for _ in self.assert_no_dangling_item_traversal() {
// The iterator's next method does the asserting for us.
}