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:
@@ -2607,8 +2607,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
&mut self,
|
||||
span: Span,
|
||||
pat: &'hir hir::Pat<'hir>,
|
||||
) -> &'hir [hir::FieldPat<'hir>] {
|
||||
let field = hir::FieldPat {
|
||||
) -> &'hir [hir::PatField<'hir>] {
|
||||
let field = hir::PatField {
|
||||
hir_id: self.next_id(),
|
||||
ident: Ident::new(sym::integer(0), span),
|
||||
is_shorthand: false,
|
||||
@@ -2622,7 +2622,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
&mut self,
|
||||
span: Span,
|
||||
lang_item: hir::LangItem,
|
||||
fields: &'hir [hir::FieldPat<'hir>],
|
||||
fields: &'hir [hir::PatField<'hir>],
|
||||
) -> &'hir hir::Pat<'hir> {
|
||||
let qpath = hir::QPath::LangItem(lang_item, span);
|
||||
self.pat(span, hir::PatKind::Struct(qpath, fields, false))
|
||||
|
||||
Reference in New Issue
Block a user