summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-21 22:03:17 +0100
committerGitHub <noreply@github.com>2022-01-21 22:03:17 +0100
commitab19d4a515366ab68b73af3f9a55db52d5542a06 (patch)
tree75d62d47faea1f961402cbd1e87f8c9ffd89da8c /compiler/rustc_codegen_llvm
parent1f3a2dd0b1990bbb2e225f3b341a225e171f6c91 (diff)
parentb2dd1377c7b2624391d82b0eee2c988e090dd311 (diff)
downloadrust-ab19d4a515366ab68b73af3f9a55db52d5542a06.tar.gz
rust-ab19d4a515366ab68b73af3f9a55db52d5542a06.zip
Rollup merge of #93046 - est31:let_else, r=davidtwco
Use let_else in even more places

Followup of #89933, #91018, #91481.
Diffstat (limited to 'compiler/rustc_codegen_llvm')
-rw-r--r--compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs2
-rw-r--r--compiler/rustc_codegen_llvm/src/lib.rs1
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
index 3d5fd2f354e..c90e43a4060 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
@@ -1493,7 +1493,7 @@ fn generator_layout_and_saved_local_names<'tcx>(
 
     let state_arg = mir::Local::new(1);
     for var in &body.var_debug_info {
-        let place = if let mir::VarDebugInfoContents::Place(p) = var.value { p } else { continue };
+        let mir::VarDebugInfoContents::Place(place) = &var.value else { continue };
         if place.local != state_arg {
             continue;
         }
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs
index cea4595fbbf..f0612eaba80 100644
--- a/compiler/rustc_codegen_llvm/src/lib.rs
+++ b/compiler/rustc_codegen_llvm/src/lib.rs
@@ -7,6 +7,7 @@
 #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
 #![feature(bool_to_option)]
 #![feature(crate_visibility_modifier)]
+#![feature(let_else)]
 #![feature(extern_types)]
 #![feature(nll)]
 #![recursion_limit = "256"]