We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3058b55 commit 1e51260Copy full SHA for 1e51260
gcc/rust/privacy/rust-reachability.cc
@@ -110,15 +110,12 @@ ReachabilityVisitor::visit (HIR::StructStruct &struct_item)
110
}
111
112
113
- // for (auto &field : struct_item.get_fields ())
114
- // if (field.get_visibility ().is_public ())
115
- // FIXME: How do we visit these fields with the reachability
116
- // visitor?
+ for (auto &field : struct_item.get_fields ())
+ if (field.get_visibility ().is_public ())
+ ctx.update_reachability (field.get_field_type ()->get_mappings (),
+ struct_reach);
117
118
119
- // FIXME: How do we get the constructor from `struct_item`? We need to update
120
- // its visibility as well. Probably by keeping a reference to the TypeCtx?
121
-
122
current_level = old_level;
123
124
0 commit comments