1
Fork 0

ast/hir: Rename field-related structures

StructField -> FieldDef ("field definition")
Field -> ExprField ("expression field", not "field expression")
FieldPat -> PatField ("pattern field", not "field pattern")

Also rename visiting and other methods working on them.
This commit is contained in:
Vadim Petrochenkov 2021-03-16 00:36:07 +03:00
parent 195ad4830e
commit b25d3ba781
57 changed files with 313 additions and 301 deletions

View file

@ -1698,9 +1698,9 @@ impl<'a, 'tcx> Visitor<'tcx> for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
}
}
fn visit_struct_field(&mut self, s: &'tcx hir::StructField<'tcx>) {
fn visit_field_def(&mut self, s: &'tcx hir::FieldDef<'tcx>) {
if s.vis.node.is_pub() || self.in_variant {
intravisit::walk_struct_field(self, s);
intravisit::walk_field_def(self, s);
}
}