Skip to content

Commit 61238e4

Browse files
Polygonalrphilberty
authored andcommitted
gccrs: Improve HIR dumps for patterns
gcc/rust/ChangeLog: * hir/rust-hir-dump.cc: Change pattern dumps to use visit_field. Signed-off-by: Yap Zhi Heng <[email protected]>
1 parent a25cc82 commit 61238e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gcc/rust/hir/rust-hir-dump.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,7 +2196,7 @@ Dump::visit (StructPatternFieldIdentPat &e)
21962196
auto oa = e.get_outer_attrs ();
21972197
do_outer_attrs (oa);
21982198
put_field ("ident", e.get_identifier ().as_string ());
2199-
put_field ("ident_pattern", e.get_pattern ().as_string ());
2199+
visit_field ("ident_pattern", e.get_pattern ());
22002200
end ("StructPatternFieldIdentPat");
22012201
}
22022202

@@ -2314,7 +2314,7 @@ Dump::visit (LetStmt &e)
23142314
auto oa = e.get_outer_attrs ();
23152315
do_outer_attrs (oa);
23162316

2317-
put_field ("variable_pattern", e.get_pattern ().as_string ());
2317+
visit_field ("variable_pattern", e.get_pattern ());
23182318

23192319
if (e.has_type ())
23202320
visit_field ("type", e.get_type ());

0 commit comments

Comments
 (0)