about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_hir/src/hir.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs
index 5bd6632640f..57655365cca 100644
--- a/compiler/rustc_hir/src/hir.rs
+++ b/compiler/rustc_hir/src/hir.rs
@@ -1332,7 +1332,7 @@ impl<'hir> Guard<'hir> {
     /// - `if let x = e`
     pub fn body(&self) -> &'hir Expr<'hir> {
         match self {
-            Guard::If(e) | Guard::IfLet(_, e) => e,
+            Guard::If(e) | Guard::IfLet(Let { init: e, .. }) => e,
         }
     }
 }