Skip to content

Commit 2539792

Browse files
committed
print ids of patterns when doing --pretty identified
1 parent b79d717 commit 2539792

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/rustc/driver/driver.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,10 @@ fn pretty_print_input(sess: session, cfg: ast::crate_cfg, input: input,
276276
pprust::synth_comment(s, int::to_str(expr.id, 10u));
277277
pprust::pclose(s);
278278
}
279-
_ { }
279+
pprust::node_pat(s, pat) {
280+
pp::space(s.s);
281+
pprust::synth_comment(s, "pat " + int::to_str(pat.id, 10u));
282+
}
280283
}
281284
}
282285

0 commit comments

Comments
 (0)