about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2025-01-28 18:47:47 +1100
committerZalathar <Zalathar@users.noreply.github.com>2025-02-03 16:20:53 +1100
commitee17c3bc4d326a12e2339812a40e6cc5316a1b57 (patch)
treea3de0168b010127d607c61487782f4d4043aa61d /compiler
parent4a43094662727040d8522163f295b19d1aed0e49 (diff)
downloadrust-ee17c3bc4d326a12e2339812a40e6cc5316a1b57.tar.gz
rust-ee17c3bc4d326a12e2339812a40e6cc5316a1b57.zip
Don't demand `&Box<Pat>` in `print_pat`
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_mir_build/src/thir/print.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_build/src/thir/print.rs b/compiler/rustc_mir_build/src/thir/print.rs
index 729c8f784ba..9ab87dd99ff 100644
--- a/compiler/rustc_mir_build/src/thir/print.rs
+++ b/compiler/rustc_mir_build/src/thir/print.rs
@@ -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);