Skip to content

Commit a5dec98

Browse files
committed
Auto merge of #26703 - nrc:dxr-servo-fix, r=huonw
r? @huonw
2 parents 1fc0f68 + a1d40c8 commit a5dec98

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/librustc_trans/save/dump_csv.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ impl <'l, 'tcx> DumpCsvVisitor<'l, 'tcx> {
937937

938938
fn process_pat(&mut self, p:&ast::Pat) {
939939
if generated_code(p.span) {
940-
return
940+
return;
941941
}
942942

943943
match p.node {
@@ -963,6 +963,10 @@ impl <'l, 'tcx> DumpCsvVisitor<'l, 'tcx> {
963963
if let Some(struct_def) = struct_def {
964964
let struct_fields = self.tcx.lookup_struct_fields(struct_def);
965965
for &Spanned { node: ref field, span } in fields {
966+
if generated_code(span) {
967+
continue;
968+
}
969+
966970
let sub_span = self.span.span_for_first_ident(span);
967971
for f in &struct_fields {
968972
if f.name == field.ident.name {
@@ -974,7 +978,7 @@ impl <'l, 'tcx> DumpCsvVisitor<'l, 'tcx> {
974978
break;
975979
}
976980
}
977-
self.visit_pat(&*field.pat);
981+
self.visit_pat(&field.pat);
978982
}
979983
}
980984
}

0 commit comments

Comments
 (0)