Skip to content

Commit eb2f1c8

Browse files
committed
ExprField
1 parent 8b0284a commit eb2f1c8

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

compiler/rustc_ast/src/mut_visit.rs

+13-5
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
}
@@ -1104,16 +1108,20 @@ pub fn walk_flat_map_field_def<T: MutVisitor>(
11041108
smallvec![fd]
11051109
}
11061110

1107-
pub fn walk_flat_map_expr_field<T: MutVisitor>(
1108-
vis: &mut T,
1109-
mut f: ExprField,
1110-
) -> SmallVec<[ExprField; 1]> {
1111-
let ExprField { ident, expr, span, is_shorthand: _, attrs, id, is_placeholder: _ } = &mut f;
1111+
pub fn walk_expr_field<T: MutVisitor>(vis: &mut T, f: &mut ExprField) {
1112+
let ExprField { ident, expr, span, is_shorthand: _, attrs, id, is_placeholder: _ } = f;
11121113
vis.visit_id(id);
11131114
visit_attrs(vis, attrs);
11141115
vis.visit_ident(ident);
11151116
vis.visit_expr(expr);
11161117
vis.visit_span(span);
1118+
}
1119+
1120+
pub fn walk_flat_map_expr_field<T: MutVisitor>(
1121+
vis: &mut T,
1122+
mut f: ExprField,
1123+
) -> SmallVec<[ExprField; 1]> {
1124+
vis.visit_expr_field(&mut f);
11171125
smallvec![f]
11181126
}
11191127

0 commit comments

Comments
 (0)