Remove anon struct and union types

This commit is contained in:
Michael Goulet
2024-09-29 22:17:30 -04:00
parent e3a0da1863
commit 40465d2449
19 changed files with 3 additions and 227 deletions

View File

@@ -724,29 +724,6 @@ impl<'a, 'ra, 'tcx> BuildReducedGraphVisitor<'a, 'ra, 'tcx> {
// Record field names for error reporting.
self.insert_field_idents(def_id, fields);
self.insert_field_visibilities_local(def_id.to_def_id(), fields);
for field in fields {
match &field.ty.kind {
ast::TyKind::AnonStruct(id, nested_fields)
| ast::TyKind::AnonUnion(id, nested_fields) => {
let feed = self.r.feed(*id);
let local_def_id = feed.key();
let def_id = local_def_id.to_def_id();
let def_kind = self.r.tcx.def_kind(local_def_id);
let res = Res::Def(def_kind, def_id);
self.build_reduced_graph_for_struct_variant(
&nested_fields,
Ident::empty(),
feed,
res,
// Anonymous adts inherit visibility from their parent adts.
adt_vis,
field.ty.span,
);
}
_ => {}
}
}
}
/// Constructs the reduced graph for one item.