Don't demand &Box<Pat> in print_pat

This commit is contained in:
Zalathar 2025-01-28 18:47:47 +11:00
parent 4a43094662
commit ee17c3bc4d

View File

@ -643,8 +643,8 @@ impl<'a, 'tcx> ThirPrinter<'a, 'tcx> {
print_indented!(self, "}", depth_lvl);
}
fn print_pat(&mut self, pat: &Box<Pat<'tcx>>, depth_lvl: usize) {
let Pat { ty, span, kind } = &**pat;
fn print_pat(&mut self, pat: &Pat<'tcx>, depth_lvl: usize) {
let &Pat { ty, span, ref kind } = pat;
print_indented!(self, "Pat: {", depth_lvl);
print_indented!(self, format!("ty: {:?}", ty), depth_lvl + 1);