about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/lib.rs
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2022-02-02 12:45:20 +0100
committerest31 <MTest31@outlook.com>2022-02-02 17:11:01 +0100
commit670f5c6ef385f251df5cd7bcba9e8039a80bdb4d (patch)
treecdf352502795e4fb84b125e3a9c6f4162f6f4d24 /compiler/rustc_borrowck/src/lib.rs
parentd5f9c40e6a9ecc62432e71e886cef83a4c2c9b98 (diff)
downloadrust-670f5c6ef385f251df5cd7bcba9e8039a80bdb4d.tar.gz
rust-670f5c6ef385f251df5cd7bcba9e8039a80bdb4d.zip
More let_else adoptions
Diffstat (limited to 'compiler/rustc_borrowck/src/lib.rs')
-rw-r--r--compiler/rustc_borrowck/src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs
index c288cc96990..5597a8b0915 100644
--- a/compiler/rustc_borrowck/src/lib.rs
+++ b/compiler/rustc_borrowck/src/lib.rs
@@ -1427,9 +1427,8 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                             bug!("temporary should be initialized exactly once")
                         };
 
-                        let loc = match init.location {
-                            InitLocation::Statement(stmt) => stmt,
-                            _ => bug!("temporary initialized in arguments"),
+                        let InitLocation::Statement(loc) = init.location else {
+                            bug!("temporary initialized in arguments")
                         };
 
                         let body = self.body;