summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Pepyakin <s.pepyakin@gmail.com>2017-10-02 23:50:31 +0300
committerSergey Pepyakin <s.pepyakin@gmail.com>2017-10-03 00:37:20 +0300
commitb02b158d39d30285d71adf34d6cc5b299caeada0 (patch)
treedb050467759f495976f5791b4a7a42acf601d4dc
parent6eb4f1eaa647bf727d9a4086502589ea936bd838 (diff)
Assert we only gen partialeq for non rust unions
-rw-r--r--src/codegen/impl_partialeq.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/codegen/impl_partialeq.rs b/src/codegen/impl_partialeq.rs
index 15a8953e..7ac96003 100644
--- a/src/codegen/impl_partialeq.rs
+++ b/src/codegen/impl_partialeq.rs
@@ -20,6 +20,7 @@ pub fn gen_partialeq_impl(
&self._bindgen_opaque_blob[..] == &other._bindgen_opaque_blob[..]
});
} else if comp_info.kind() == CompKind::Union {
+ assert!(!ctx.options().rust_features().untagged_union());
tokens.push(quote! {
&self.bindgen_union_field[..] == &other.bindgen_union_field[..]
});