summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ir/comp.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ir/comp.rs b/src/ir/comp.rs
index a4929b7a..e8c8b708 100644
--- a/src/ir/comp.rs
+++ b/src/ir/comp.rs
@@ -630,9 +630,13 @@ impl CompInfo {
// anonymous, let's just assume that if the cursor we've
// found is a definition it's a valid inner type.
//
+ // Note that doing this could be always ok, but let's just
+ // keep the union check for now.
+ //
// https://github.com/servo/rust-bindgen/issues/482
let is_inner_struct = cur.semantic_parent() == cursor ||
- cur.is_definition();
+ (kind == CompKind::Union &&
+ cur.is_definition());
if !is_inner_struct {
return CXChildVisit_Continue;
}