Skip to content

Commit a83449d

Browse files
maxcabrajacicmccorm
authored andcommitted
ExprField
1 parent 68800bc commit a83449d

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

compiler/rustc_ast/src/mut_visit.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ pub trait MutVisitor: Sized {
307307
walk_mt(self, mt);
308308
}
309309

310+
fn visit_expr_field(&mut self, f: &mut ExprField) {
311+
walk_expr_field(self, f);
312+
}
313+
310314
fn flat_map_expr_field(&mut self, f: ExprField) -> SmallVec<[ExprField; 1]> {
311315
walk_flat_map_expr_field(self, f)
312316
}
@@ -1108,16 +1112,20 @@ pub fn walk_flat_map_field_def<T: MutVisitor>(
11081112
smallvec![fd]
11091113
}
11101114

1111-
pub fn walk_flat_map_expr_field<T: MutVisitor>(
1112-
vis: &mut T,
1113-
mut f: ExprField,
1114-
) -> SmallVec<[ExprField; 1]> {
1115-
let ExprField { ident, expr, span, is_shorthand: _, attrs, id, is_placeholder: _ } = &mut f;
1115+
pub fn walk_expr_field<T: MutVisitor>(vis: &mut T, f: &mut ExprField) {
1116+
let ExprField { ident, expr, span, is_shorthand: _, attrs, id, is_placeholder: _ } = f;
11161117
vis.visit_id(id);
11171118
visit_attrs(vis, attrs);
11181119
vis.visit_ident(ident);
11191120
vis.visit_expr(expr);
11201121
vis.visit_span(span);
1122+
}
1123+
1124+
pub fn walk_flat_map_expr_field<T: MutVisitor>(
1125+
vis: &mut T,
1126+
mut f: ExprField,
1127+
) -> SmallVec<[ExprField; 1]> {
1128+
vis.visit_expr_field(&mut f);
11211129
smallvec![f]
11221130
}
11231131

0 commit comments

Comments
 (0)