about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Holk <ericholk@microsoft.com>2022-05-19 16:32:06 -0700
committerEric Holk <ericholk@microsoft.com>2022-05-19 16:32:06 -0700
commit7d1dbdf3de3abcce9bbd571e5c88b890e9a37243 (patch)
treedb4418758e40b9393f3f42b2658a4388af5a359c
parentfce4c7998b5e013f54f8c3e30dd90b4950d3aeb3 (diff)
downloadrust-7d1dbdf3de3abcce9bbd571e5c88b890e9a37243.tar.gz
rust-7d1dbdf3de3abcce9bbd571e5c88b890e9a37243.zip
Update IfLet syntax
-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,
         }
     }
 }